8 #ifndef K_FIRESYNC_PROFILE_MSG_H
9 #define K_FIRESYNC_PROFILE_MSG_H
12 #include <kFireSync/Data/kProfileMsg.x.h>
82 return xkProfileMsg_RefAt(msg, itemIndex)->stamp;
97 kProfileMsgRef* ref = xkProfileMsg_RefAt(msg, itemIndex);
99 kAssert(pointIndex < obj->pointCount);
101 return kPointer_ItemOffset(ref->pointData, pointIndex, kType_Size(obj->pointType));
117 #define kProfileMsg_PointAtT(kProfileMsg_msg, kSize_itemIndex, kSize_pointIndex, T) \
118 kCast(T*, xkProfileMsg_PointAtT(kProfileMsg_msg, kSize_itemIndex, kSize_pointIndex, sizeof(T)))
132 k8u* intensities = xkProfileMsg_RefAt(msg, itemIndex)->intensities;
134 kAssert(pointIndex < obj->pointCount);
136 return &intensities[pointIndex];
151 k16u* slices = xkProfileMsg_RefAt(msg, itemIndex)->slices;
153 kAssert(pointIndex < obj->pointCount);
155 return &slices[pointIndex];
169 return obj->pointType;
183 return obj->pointCount;
197 return obj->profileCount;
211 return obj->hasSlices;
void * kProfileMsg_PointAt(kProfileMsg msg, kSize itemIndex, kSize pointIndex)
Returns a pointer to a specific point.
Definition: kProfileMsg.h:94
Declares the kMsgSet type.
#define kObj(TypeName_T, T_object)
kStatus kProfileMsg_Attach(kProfileMsg msg, kSize itemIndex, kStamp *stamp, void *pointData, void *intensityData, void *sliceData)
Attaches one of the profiles to external buffer(s).
kStatus kProfileMsg_Assign(kProfileMsg msg, kProfileMsg source)
Copies the source message.
k16u * kProfileMsg_SliceAt(kProfileMsg msg, kSize itemIndex, kSize pointIndex)
Returns a pointer to a specific slice value.
Definition: kProfileMsg.h:148
kStatus kProfileMsg_BeginAttach(kProfileMsg msg, kType pointType, kSize pointCount, kSize profileCount)
Prepare attaching the message content to external buffer(s).
#define kAssert(EXPRESSION)
kStamp * kProfileMsg_StampAt(kProfileMsg msg, kSize itemIndex)
Returns a pointer to the stamp specified by item index.
Definition: kProfileMsg.h:80
Represents acquisition metadata associated with a data message.
Definition: kNodeDef.h:2662
k8u * kProfileMsg_IntensityAt(kProfileMsg msg, kSize itemIndex, kSize pointIndex)
Returns a pointer to a specific intensity value.
Definition: kProfileMsg.h:129
kStatus kProfileMsg_Construct(kProfileMsg *msg, kType pointType, kSize pointCount, kSize profileCount, kBool hasSlices, kAlloc allocator)
Constructs a kProfileMsg object.
Represents a data message (FPGA LUT).