Batch

class c104.Batch

This class represents a batch of outgoing monitoring messages of the same station and type

__init__(self, cause: c104.Cot, points: list[c104.Point] | None = None) None

create a new batch of monitoring messages of the same station and the same type

Parameters:
  • cause (c104.Cot) – what caused the transmission of the monitoring data

  • points (list[c104.Point], optional) – initial list of points

Raises:

ValueError – if one point in the list is not compatible with the others

Example

>>> batch = c104.Batch(cause=c104.Cot.SPONTANEOUS, points=[point1, point2, point3])
add_point(self: c104.Batch, point: c104.Point) None

add a new point to this Batch

Parameters:

point (c104.Point) – to be added point

Return type:

None

Raises:

ValueError – if point is not compatible with the batch or if it is already in the batch

Example

>>> my_batch.add_point(my_point)
property common_address

common address (1-65534) (read-only)

Type:

int

property cot

cause of transmission (read-only)

Type:

c104.Cot

property has_points

test if batch contains points (read-only)

Type:

bool

property is_negative

test if negative flag is set (read-only)

Type:

bool

property is_sequence

test if sequence flag is set (read-only)

Type:

bool

property is_test

test if test flag is set (read-only)

Type:

bool

property number_of_objects

represents the number of information objects (read-only)

Type:

int

property originator_address

originator address (0-255)

Type:

int

property points

get a list of contained points (read-only)

Type:

list[c104.Point]

property type

IEC60870 message type identifier (read-only)

Type:

c104.Type