Zusi 3 TCP Protocol Library
An implementation of the Zusi 3 TCP protocol in C++.
Public Member Functions | Public Attributes | List of all members
zusi::Attribute Class Reference

Generic Zusi message attribute. Data is owned by the class. More...

#include <Zusi3TCP.h>

Public Member Functions

 Attribute ()
 Construct an empty attribute.
 
 Attribute (uint16_t id)
 Constructs an attribute. More...
 
void write (Socket &sock) const
 
bool read (Socket &sock, uint32_t length)
 
uint16_t getId () const
 Get Attribute ID.
 
void setValueUint16 (uint16_t value)
 Utility function to set the value as Word.
 
void setValueInt16 (int16_t value)
 Utility function to set the value as SmallInt.
 

Public Attributes

uint32_t data_bytes
 Number of bytes in data.
 
void * data
 Attribute data.
 

Detailed Description

Generic Zusi message attribute. Data is owned by the class.

Constructor & Destructor Documentation

zusi::Attribute::Attribute ( uint16_t  id)
inline

Constructs an attribute.

Parameters
idAttribute ID

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