Weather Monitoring Station Simulator
-
class WMSSimulatorServer(server_name, device_name, config_path=None, logger=None)
Simulate the h/w for a Weather Station by responding to Modbus requests.
- Parameters:
server_name (str)
device_name (str)
config_path (str | None)
logger (Logger | None)
-
async start(only_start)
Start the simulator.
- Parameters:
only_start (bool) – set to True to return after starting.
- Return type:
None
-
async stop()
Stop the simulator.
- Return type:
None
-
start_simulator_threads()
Start generating changing data.
- Return type:
None
-
stop_simulator_threads()
Stop generating changing data.
- Return type:
None
-
class WMSSimulator
Simulate the Modbus registers for the Weather Station h/w.
-
start_sim_threads()
Start all the sensors generating data.
- Return type:
None
-
stop_sim_threads()
Stop all the sensors generating data.
- Return type:
None
-
property ch_0_1_2_input_range: int
Input current range.
-
property ch_3_4_5_input_range: int
Input current range.
-
property ch00_status: int
Channel status.
-
property ch01_status: int
Channel status.
-
property ch02_status: int
Channel status.
-
property ch03_status: int
Channel status.
-
property ch04_status: int
Channel status.
-
property ch05_status: int
Channel status.
-
property ch00_sensor: int
Wind speed in adc counts.
-
property ch01_sensor: int
Wind direction in adc counts.
-
property ch02_sensor: int
Temperature in adc counts.
-
property ch03_sensor: int
Humidity in adc counts.
-
property ch04_sensor: int
Pressure in adc counts.
-
property ch05_sensor: int
Rainfall in adc counts.
-
ch_0_1_2_input_range_cell(_registers, _inx, _cell)
Set the channels 0-2 input range register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch_3_4_5_input_range_cell(_registers, _inx, _cell)
Set the channels 3-5 input range register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch00_status_cell(_registers, _inx, _cell)
Set the CH00 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch01_status_cell(_registers, _inx, _cell)
Set the CH01 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch02_status_cell(_registers, _inx, _cell)
Set the CH02 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch03_status_cell(_registers, _inx, _cell)
Set the CH03 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch04_status_cell(_registers, _inx, _cell)
Set the CH04 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch05_status_cell(_registers, _inx, _cell)
Set the CH05 status register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch00_sensor_cell(_registers, _inx, _cell)
Set the CH00 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch01_sensor_cell(_registers, _inx, _cell)
Set the CH01 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch02_sensor_cell(_registers, _inx, _cell)
Set the CH02 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch03_sensor_cell(_registers, _inx, _cell)
Set the CH03 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch04_sensor_cell(_registers, _inx, _cell)
Set the CH04 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)
-
ch05_sensor_cell(_registers, _inx, _cell)
Set the CH05 adc register value.
- Return type:
None
- Parameters:
_registers (list[Cell])
_inx (int)
_cell (Cell)