Station
- class c104.Station
This class represents local or remote stations and provides access to meta information and containing points
- add_point(self: c104.Station, io_address: int, type: c104.Type, report_ms: int = 0, related_io_address: int = 0, related_io_autoreturn: bool = False, command_mode: c104.CommandMode = c104.CommandMode.DIRECT) c104.Point | None
add a new point to this station and return the new point object
- Parameters:
io_address (int) – point information object address (value between 0 and 16777216)
type (Type) – point information type
report_ms (int) – automatic reporting interval in milliseconds (monitoring points server-sided only)
related_io_address (int) – related monitoring point identified by information object address, that should be auto transmitted on incoming client command (for control points server-sided only)
related_io_autoreturn (bool) – automatic reporting interval in milliseconds (for control points server-sided only)
command_mode (CommandMode) – command transmission mode (direct or select-and-execute)
- Returns:
station object, if station was added, else None
- Return type:
- Raises:
ValueError – If io_address or type is invalid
ValueError – If report_ms, related_io_address or related_auto_return is set, but type is not a monitoring type
ValueError – If related_auto_return is set, but related_io_address is not set
ValueError – If related_auto_return is set, but type is not a control type
Example
>>> point_1 = sv_station_1.add_point(common_address=15, type=c104.Type.M_ME_NC_1) >>> point_2 = sv_station_1.add_point(io_address=11, type=c104.Type.M_ME_NC_1, report_ms=1000) >>> point_3 = sv_station_1.add_point(io_address=12, type=c104.Type.C_SE_NC_1, report_ms=0, related_io_address=point_2.io_address, related_io_autoreturn=True, command_mode=c104.CommandMode.SELECT_AND_EXECUTE)
- get_point(self: c104.Station, io_address: int) c104.Point | None
get a point object via information object address
- Parameters:
io_address (int) – point information object address (value between 0 and 16777216)
- Returns:
point object, if found, else None
- Return type:
Example
>>> point_11 = my_station.get_point(io_address=11)
- property connection
parent Connection of non-local station (read-only)
- Type:
Optional[Connection]
- property is_local
test if station is local (has sever) or remote (has connection) one (read-only)
- Type: