MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Functions
Bit Namespace Reference

Functions

unsigned long btoh24 (char *p)
 Retrieves a long in network order from the pointer p. More...
 
unsigned long btohl (const char *p)
 Retrieves a long in network order from the pointer p. More...
 
unsigned long long btohll (char *p)
 Retrieves a long long in network order from the pointer p. More...
 
unsigned short btohs (char *p)
 Retrieves a short in network order from the pointer p. More...
 
unsigned long long getByName (char *pointer)
 
unsigned long long getMSB (char *pointer, unsigned int offsetBits, unsigned int dataBits)
 Takes a pointer, offset bitcount and data bitcount, returning the unsigned int read from the givens. More...
 
void htob24 (char *p, unsigned long val)
 Stores a long value of val in network order to the pointer p. More...
 
void htobl (char *p, unsigned long val)
 Stores a long value of val in network order to the pointer p. More...
 
void htobll (char *p, unsigned long long val)
 Stores a long value of val in network order to the pointer p. More...
 
void htobs (char *p, unsigned short val)
 Stores a short value of val in network order to the pointer p. More...
 
void setByName (char *pointer)
 
void setMSB (char *pointer, unsigned int offsetBits, unsigned int dataBits, unsigned long long value)
 Takes a pointer, offset bitcount and data bitcount, setting to given value. More...
 

Function Documentation

unsigned long Bit::btoh24 ( char *  p)
inline

Retrieves a long in network order from the pointer p.

unsigned long Bit::btohl ( const char *  p)
inline

Retrieves a long in network order from the pointer p.

unsigned long long Bit::btohll ( char *  p)
inline

Retrieves a long long in network order from the pointer p.

unsigned short Bit::btohs ( char *  p)
inline

Retrieves a short in network order from the pointer p.

unsigned long long Bit::getByName ( char *  pointer)
unsigned long long Bit::getMSB ( char *  pointer,
unsigned int  offsetBits,
unsigned int  dataBits 
)

Takes a pointer, offset bitcount and data bitcount, returning the unsigned int read from the givens.

offsetBits may be > 7, in which case offsetBits / 8 is added to the pointer automatically. This function assumes Most Significant Bits first. If dataBits > 64, only the last 64 bits are returned.

void Bit::htob24 ( char *  p,
unsigned long  val 
)
inline

Stores a long value of val in network order to the pointer p.

void Bit::htobl ( char *  p,
unsigned long  val 
)
inline

Stores a long value of val in network order to the pointer p.

void Bit::htobll ( char *  p,
unsigned long long  val 
)
inline

Stores a long value of val in network order to the pointer p.

void Bit::htobs ( char *  p,
unsigned short  val 
)
inline

Stores a short value of val in network order to the pointer p.

void Bit::setByName ( char *  pointer)
void Bit::setMSB ( char *  pointer,
unsigned int  offsetBits,
unsigned int  dataBits,
unsigned long long  value 
)

Takes a pointer, offset bitcount and data bitcount, setting to given value.

offsetBits may be > 7, in which case offsetBits / 8 is added to the pointer automatically. This function assumes Most Significant Bits first. WARNING: UNFINISHED. DO NOT USE.

Todo:
Finish writing this - untested atm.