dfins.util

Utility functions to convert PLC words

Members

Functions

fromBCD
ushort fromBCD(ushort bcd)

Converts BCD value into decimal format

nativeToFins
ubyte[] nativeToFins(T val)

Converts the given value from the native endianness to Fins format and returns it as a ubyte[n] where n is the size of the given type.

readFins
T readFins(R input)

Takes an input range of ubyte and converts the first T.sizeof words to T. The array is consumed.

swapByteOrder
ubyte[] swapByteOrder(ubyte[] data)

Swap byte order of items in an array.

toBCD
ushort toBCD(ushort dec)

Converts ushort value into BDC format

Meta

License

Boost Software License - Version 1.0 - August 17th, 2003

Authors

Orfeo Da Vià