KM3NeT CLB
2.0
KM3NeT CLB v2 Embedded Software
|
The monitor module is responsible for sending variables to the remote party based on subscription. More...
Go to the source code of this file.
Macros | |
#define | MON_MAX_VARS ( TOTAL_VAR_COUNT ) |
Maximum number of variables which can be monitored. | |
#define | MON_MAX_BLOB (559 + TOTAL_VAR_COUNT * 4) |
Maximim blob size. | |
Functions | |
bool | monSubscribeVars (int32_t *varIds, int count, int rate) |
Subscribe to array of variables. More... | |
void | monUnsubscribeVars (int32_t *varIds, int count) |
Unsubscribe to array of variables. More... | |
bool | monSubscribeVar (int32_t varId, int rate) |
Subscribe to a variable. More... | |
void | monUnsubscribeVar (int32_t varId) |
Unsubscribe to a variable. More... | |
int | monUpdate (DataBuffer *buffer, int offset, int rate) |
Write update variable information into the specified buffer. More... | |
The monitor module is responsible for sending variables to the remote party based on subscription.
It does not do any of the actual sending of data it self. It just keeps track of which variables to write.
Definition in file monitor.h.
bool monSubscribeVar | ( | int32_t | varId, |
int | rate | ||
) |
bool monSubscribeVars | ( | int32_t * | varIds, |
int | count, | ||
int | rate | ||
) |
void monUnsubscribeVar | ( | int32_t | varId | ) |
void monUnsubscribeVars | ( | int32_t * | varIds, |
int | count | ||
) |
Unsubscribe to array of variables.
If the ID does not exist, it is ignored.
varIds | The array of variable IDs |
count | The number of variables |
int monUpdate | ( | DataBuffer * | buffer, |
int | offset, | ||
int | rate | ||
) |
Write update variable information into the specified buffer.
buffer | Buffer to write into |
offset | Offset (variable index) to start from. Begin at 0. |
rate | The rate value acts as a filter such that all variables var_rate >= rate will be added to the update packet. For example, is there are variables with rate 1, 2 and 3, providing rate value 3, only variables with 3 will be added. When providing rate 2, variables with rate 2 and 3 will be added. |
-1 | Error, check error module |
0 | All ok, all variables written |
other | Written up to specified offset |