IReader pulls data from the frame source into a FrameStruct on GetCurrentFrame(). FrameStruct contains all the information necessary to be received and decoded by a Sensor Stream Client.
FrameStructs are a sample of sensor data of a certain data type. Sensors that collect different data can send different frame types.
Azure Kinect can stream: RGB (color), depth, and IR data. This means that there are 3 frame types that Sensor Stream Server can send when streaming Azure Kinect data. Each frame type gets its own FrameStruct when sampling data.
Sensor Stream Server reads the config yaml and depending on its configuration will create an IReader that pulls data from the frame source and generates FrameStructs for each frame type.
FrameStruct contains additional information to binary sensor data. It also contains information like the CameraCalibrationStruct, which provides the intrinsics of the sensor. This can be used in downstream computer vision/spatial computing pipelines.
FrameStruct also contains information for how it has been encoded in CodecParamsStruct. This is so the receiving end, Sensor Stream Pipe, knows how to decode the frame struct.
FrameStructs are sent by the Sensor Stream Pipe by being converted to string through CerealStructToString method. The string is then packaged as a zmq message and sent through a zmq socket.