Public Types | Public Member Functions
BatteryPayload Class Reference

#include <CubeMessages.h>

List of all members.

Public Types

enum  MessageId { MessageId = 0x05 }

Public Member Functions

void bigEndianValues ()
void get (CubeTcpServer *tcpServer)
float value () const

Member Enumeration Documentation

Enumerator:
MessageId 
{MessageId=0x05};

Member Function Documentation

{
#if BYTE_ORDER==LITTLE_ENDIAN
  ByteOrder::swap(_battery.bytes);
#endif
}
void BatteryPayload::get ( CubeTcpServer tcpServer)

References GpCoreTools::TcpServerStream::send(), and value().

{
  char buf[32];
  snprintf(buf, 32, "battery=%f V\n", value());
  tcpServer->send(buf, strlen(buf));
}
float BatteryPayload::value ( ) const [inline]

Referenced by get().

{return _battery.value/2048.0;}

Member Data Documentation

unsigned char BatteryPayload::bytes[4]
unsigned int BatteryPayload::value

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines