UInt

class pyrogue.UInt(bitSize)[source]

Model class for unsigned integers.

Parameters:
  • bitSize (int) – Number of bits being represented.

  • args (Any)

  • kwargs (Any)

Return type:

Any

pytype

alias of int

toBytes(value)[source]
Parameters:

value (int) – Python value to convert.

Returns:

Byte array representation of the value.

Return type:

bytes

fromBytes(ba)[source]
Parameters:

ba (bytes) – Byte array to extract value from.

Returns:

Python value.

Return type:

int

fromString(string)[source]
Parameters:

string (str) – String representation of the value.

Returns:

Python value.

Return type:

int

minValue()[source]

Return the minimum unisgned int (0).

Return type:

int

maxValue()[source]

Return the maximum unsigned int (2**bitSize-1).

Return type:

int