rasdaman complete source
|
#include <rnprotocol.hh>
Public Member Functions | |
RnpProtocolDecoder () throw () | |
Default constructor. More... | |
bool | decode (akg::CommBuffer *) throw () |
RnpQuark | getDestinationServerType () const throw () |
Returns the code of the destination server. More... | |
Rnp::Endianness | getDesiredEndianness () const throw () |
Returns the desired endianness. More... | |
Rnp::Endianness | getOriginalEndianness () const throw () |
Returns the original endianness of the message. More... | |
int | getMessageLength () const throw () |
Returns the total message length. More... | |
int | getMessageVersion () const throw () |
Returns the version of the message. More... | |
RnpQuark | countFragments () const throw () |
Returns the number of fragments contained in the message. More... | |
const RnpFragmentHeader * | getFirstFragment () const throw () |
Returns a pointer to the first fragment. More... | |
const RnpFragmentHeader * | getNextFragment () const throw () |
Returns a pointer to the next fragment. More... | |
RnpQuark | getFragmentType () const throw () |
Returns the type of the current fragment. More... | |
const char * | getFragmentTypeName () const throw () |
Returns the name of type of the current fragment. More... | |
RnpQuark | getCommand () const throw () |
Returns the command of the current fragment. More... | |
int | countParameters () const throw () |
Returns the number of parameters of the current fragment. More... | |
RnpQuark | getFragmentLength () const throw () |
Returns the length of the current fragment. More... | |
const RnpParameter * | getFirstParameter () const throw () |
Returns a pointer to the first parameter of the current fragment. More... | |
const RnpParameter * | getNextParameter () const throw () |
Returns a pointer to the next parameter of the current fragment. More... | |
RnpQuark | getParameterType () const throw () |
Returns the logical type of the current parameter. More... | |
RnpQuark | getDataType () const throw () |
Returns the data type of the current parameter. More... | |
const void * | getData () const throw () |
Returns a pointer to the data of the current parameter, can't be NULL. More... | |
const char * | getDataAsString () const throw () |
Returns a pointer to the data of the current parameter, as string-asciiz (assert!) (can be NULL) More... | |
int | getDataAsInteger () const throw () |
Returns a pointer to the data of the current parameter, as integer (assert!) More... | |
float | getDataAsFloat () const throw () |
Returns a pointer to the data of the current parameter, as float (assert!) More... | |
double | getDataAsDouble () const throw () |
Returns a pointer to the data of the current parameter, as double (assert!) More... | |
const void * | getDataAsOpaque () const throw () |
Returns a pointer to the data of the current parameter, as const void* (assert!) (can be NULL) More... | |
int | getDataLength () const throw () |
Returns the length of the data of the current parameter. More... | |
Class for decoding a RNP message. The buffer is always an external one Decoding the messsage means also changing the endianness to the host endianness
rnp::RnpProtocolDecoder::RnpProtocolDecoder | ( | ) | ||
throw | ( | |||
) |
Default constructor.
RnpQuark rnp::RnpProtocolDecoder::countFragments | ( | ) | const | |
throw | ( | |||
) |
Returns the number of fragments contained in the message.
int rnp::RnpProtocolDecoder::countParameters | ( | ) | const | |
throw | ( | |||
) |
Returns the number of parameters of the current fragment.
bool rnp::RnpProtocolDecoder::decode | ( | akg::CommBuffer * | ) | ||
throw | ( | ||||
) |
Takes the buffer and decodes it, provided it is a RNP message Returns 'false' if it is not a RNP message, or the message is corrupt (for now, if the endianness is not the one of the host, no integrity verification is done. In this case endianness is changes, but if the message is corrupt...bang!!). Later this will have to throw something
RnpQuark rnp::RnpProtocolDecoder::getCommand | ( | ) | const | |
throw | ( | |||
) |
Returns the command of the current fragment.
const void* rnp::RnpProtocolDecoder::getData | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, can't be NULL.
double rnp::RnpProtocolDecoder::getDataAsDouble | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, as double (assert!)
float rnp::RnpProtocolDecoder::getDataAsFloat | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, as float (assert!)
int rnp::RnpProtocolDecoder::getDataAsInteger | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, as integer (assert!)
const void* rnp::RnpProtocolDecoder::getDataAsOpaque | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, as const void* (assert!) (can be NULL)
const char* rnp::RnpProtocolDecoder::getDataAsString | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the data of the current parameter, as string-asciiz (assert!) (can be NULL)
int rnp::RnpProtocolDecoder::getDataLength | ( | ) | const | |
throw | ( | |||
) |
Returns the length of the data of the current parameter.
RnpQuark rnp::RnpProtocolDecoder::getDataType | ( | ) | const | |
throw | ( | |||
) |
Returns the data type of the current parameter.
Rnp::Endianness rnp::RnpProtocolDecoder::getDesiredEndianness | ( | ) | const | |
throw | ( | |||
) |
Returns the desired endianness.
RnpQuark rnp::RnpProtocolDecoder::getDestinationServerType | ( | ) | const | |
throw | ( | |||
) |
Returns the code of the destination server.
const RnpFragmentHeader* rnp::RnpProtocolDecoder::getFirstFragment | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the first fragment.
const RnpParameter* rnp::RnpProtocolDecoder::getFirstParameter | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the first parameter of the current fragment.
RnpQuark rnp::RnpProtocolDecoder::getFragmentLength | ( | ) | const | |
throw | ( | |||
) |
Returns the length of the current fragment.
RnpQuark rnp::RnpProtocolDecoder::getFragmentType | ( | ) | const | |
throw | ( | |||
) |
Returns the type of the current fragment.
const char* rnp::RnpProtocolDecoder::getFragmentTypeName | ( | ) | const | |
throw | ( | |||
) |
Returns the name of type of the current fragment.
int rnp::RnpProtocolDecoder::getMessageLength | ( | ) | const | |
throw | ( | |||
) |
Returns the total message length.
int rnp::RnpProtocolDecoder::getMessageVersion | ( | ) | const | |
throw | ( | |||
) |
Returns the version of the message.
const RnpFragmentHeader* rnp::RnpProtocolDecoder::getNextFragment | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the next fragment.
const RnpParameter* rnp::RnpProtocolDecoder::getNextParameter | ( | ) | const | |
throw | ( | |||
) |
Returns a pointer to the next parameter of the current fragment.
Rnp::Endianness rnp::RnpProtocolDecoder::getOriginalEndianness | ( | ) | const | |
throw | ( | |||
) |
Returns the original endianness of the message.
RnpQuark rnp::RnpProtocolDecoder::getParameterType | ( | ) | const | |
throw | ( | |||
) |
Returns the logical type of the current parameter.