NetSim Source Code Help
Loading...
Searching...
No Matches
BatteryModel.h
Go to the documentation of this file.
1#pragma once
2/************************************************************************************
3* Copyright (C) 2020 *
4* TETCOS, Bangalore. India *
5* *
6* Tetcos owns the intellectual property rights in the Product and its content. *
7* The copying, redistribution, reselling or publication of any or all of the *
8* Product or its content without express prior written consent of Tetcos is *
9* prohibited. Ownership and / or any other right relating to the software and all *
10* intellectual property rights therein shall remain at all times with Tetcos. *
11* *
12* Author: Shashi Kant Suman *
13* *
14* ---------------------------------------------------------------------------------*/
15
16#ifndef _NETSIM_BATTERY_MODEL_H_
17#define _NETSIM_BATTERY_MODEL_H_
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#ifndef _BATTERY_MODEL_CODE_
23#pragma comment(lib,"BatteryModel.lib")
24 typedef void* ptrBATTERY;
25#endif
26
28 NETSIM_ID in);
29 _declspec(dllexport) void battery_add_new_mode(ptrBATTERY battery,
30 int mode,
31 double current,
32 char* heading);
34 NETSIM_ID interfaceId,
35 double initialEnergy,
36 double voltage,
37 double dRechargingCurrent);
38 _declspec(dllexport) bool battery_set_mode(ptrBATTERY battery,
39 int mode,
40 double time);
41 _declspec(dllexport) void battery_animation();
42 _declspec(dllexport) void battery_metrics(PMETRICSWRITER metricsWriter);
43 _declspec(dllexport) double battery_get_remaining_energy(ptrBATTERY battery);
44 _declspec(dllexport) double battery_get_consumed_energy(ptrBATTERY battery, int mode);
45
46#ifdef __cplusplus
47}
48#endif
49#endif //_NETSIM_BATTERY_MODEL_H_
unsigned int NETSIM_ID
Definition: Animation.h:45
void battery_metrics(PMETRICSWRITER metricsWriter)
Definition: BatteryModel.c:340
void * ptrBATTERY
Definition: BatteryModel.h:24
double battery_get_remaining_energy(ptrBATTERY battery)
Definition: BatteryModel.c:384
ptrBATTERY battery_init_new(NETSIM_ID deviceId, NETSIM_ID interfaceId, double initialEnergy, double voltage, double dRechargingCurrent)
Definition: BatteryModel.c:117
void battery_add_new_mode(ptrBATTERY battery, int mode, double current, char *heading)
Definition: BatteryModel.c:101
bool battery_set_mode(ptrBATTERY battery, int mode, double time)
Definition: BatteryModel.c:158
void battery_animation()
Definition: BatteryModel.c:223
double battery_get_consumed_energy(ptrBATTERY battery, int mode)
Definition: BatteryModel.c:389
ptrBATTERY battery_find(NETSIM_ID d, NETSIM_ID in)
Definition: BatteryModel.c:82
#define _declspec(dllexport)
This function is used to trigger the update.
Definition: Linux.h:41
void * PMETRICSWRITER
Definition: MetricsWriter.h:27