DataStream  1.8.8
DataStream : framework to save/load/serialize/deserialize data
DataStream< char *, DataStreamMode::WRITE, long unsigned int > Struct Reference

How to write long unsigned int in a message. More...

#include <data_stream_message.h>

Static Public Member Functions

static bool data_stream (char *&ds, long unsigned int &data)
 Save the long unsigned int in the message. More...
 
static bool data_stream (char *&ds, long unsigned int *data, size_t nbElement)
 Save the long unsigned int in the message. More...
 

Detailed Description

How to write long unsigned int in a message.

Definition at line 136 of file data_stream_message.h.

Member Function Documentation

◆ data_stream() [1/2]

bool DataStream< char *, DataStreamMode::WRITE, long unsigned int >::data_stream ( char *&  ds,
long unsigned int &  data 
)
static

Save the long unsigned int in the message.

Parameters
[out]ds: message to be written
data: data to be saved in the message
Returns
true on success, false otherwise

Definition at line 441 of file data_stream_message.cpp.

441  {
442  const char* srcByte = (const char*)&data;
443  memcpy(ds, srcByte, sizeof(long unsigned int));
444  ds += sizeof(long unsigned int);
445  return true;
446 }

◆ data_stream() [2/2]

bool DataStream< char *, DataStreamMode::WRITE, long unsigned int >::data_stream ( char *&  ds,
long unsigned int *  data,
size_t  nbElement 
)
static

Save the long unsigned int in the message.

Parameters
[out]ds: message to be written
data: data to be saved in the message
nbElement: number of element of the data
Returns
true on success, false otherwise

Definition at line 454 of file data_stream_message.cpp.

454  {
455  const char* srcByte = (const char*)data;
456  memcpy(ds, srcByte, sizeof(long unsigned int)*nbElement);
457  ds += sizeof(long unsigned int)*nbElement;
458  return true;
459 }

The documentation for this struct was generated from the following files: