Added function AQH_ValuesDataIpcMsg_GetDatapoints().
This commit is contained in:
@@ -97,6 +97,25 @@ AQH_VALUE *AQH_MultiDataDataIpcMsg_ReadValue(const GWEN_MSG *msg)
|
||||
|
||||
|
||||
|
||||
void AQH_ValuesDataIpcMsg_GetDatapoints(const GWEN_MSG *msg, const uint64_t **pDataPtr, uint64_t *pNumberOfPoints)
|
||||
{
|
||||
if (msg) {
|
||||
const GWEN_TAG16 *tag;
|
||||
unsigned int numberOfPoints;
|
||||
const uint64_t *dataPoints;
|
||||
|
||||
tag=AQH_Tag16IpcMsg_FindFirstTagByType(msg, AQH_MSGDATA_MULTIDATA_TAGS_DATA);
|
||||
numberOfPoints=(tag?GWEN_Tag16_GetTagLength(tag):0)/(2*sizeof(uint64_t));
|
||||
dataPoints=tag?((const uint64_t*) GWEN_Tag16_GetTagData(tag)):NULL;
|
||||
if (numberOfPoints>0 && dataPoints) {
|
||||
*pDataPtr=dataPoints;
|
||||
*pNumberOfPoints=numberOfPoints;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AQH_MultiDataDataIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText)
|
||||
{
|
||||
if (GWEN_Msg_GetBytesInBuffer(msg)>=AQH_MSGDATA_MULTIDATA_MINSIZE) {
|
||||
|
||||
@@ -28,6 +28,7 @@ AQHOME_API GWEN_MSG *AQH_MultiDataDataIpcMsg_newForOne(uint16_t code, const AQH_
|
||||
AQHOME_API void AQH_MultiDataDataIpcMsg_Parse(GWEN_MSG *msg, int doCopy);
|
||||
AQHOME_API AQH_VALUE *AQH_MultiDataDataIpcMsg_ReadValue(const GWEN_MSG *msg);
|
||||
AQHOME_API AQH_VALUE *AQH_ValuesDataIpcMsg_ReadFirstValue(const GWEN_MSG *msg);
|
||||
AQHOME_API void AQH_ValuesDataIpcMsg_GetDatapoints(const GWEN_MSG *msg, const uint64_t **pDataPtr, uint64_t *pNumberOfPoints);
|
||||
|
||||
AQHOME_API void AQH_MultiDataDataIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user