Bool

class pyrogue.Bool(bitSize)[source]

Model class for booleans.

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

  • args (Any)

  • kwargs (Any)

Return type:

Any

pytype

alias of bool

toBytes(value)[source]

Convert a python bool value to a byte array.

Parameters:

value (bool) – Python bool value to convert.

Returns:

Byte array representation of the value.

Return type:

bytes

fromBytes(ba)[source]

Convert a byte array to a python bool value.

Parameters:

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

Returns:

Python value.

Return type:

bool

fromString(string)[source]

Convert a string to a python bool value.

Parameters:
  • string (str) – String representation of the value.

  • string

Returns:

Python value.

Return type:

bool

minValue()[source]

Return the minimum bool (0).

Return type:

int

maxValue()[source]

Return the maximum bool (1).

Return type:

int