class MyConnection
class PID
qualify (client, pointname)
str unqualifyName (str pointname)
updateOnPointChange (point, name, pid, dhclient)
pid_create_points (client, pid)
output_point (pid, name, value)
pid_calculate (pid)
pid_calculate_procvar (pid)
update_setpoint (pid)
update_pids (pid)
recalculate_dt (pid)
change_controller (pid)
change_procvar (pid)
have_connection (client, allpids)
lost_connection (client, allpids)
register_pid (client, pid, is_register)
reset_timer (loop, client, pid, timeoutSecs)
delete_timer (timer)
start_client (loop, host, port, domain, name, allpids)
RegisterPointChangeCallback (pid, sym, dhclient)
outputControlPoints (client, pid)
loop = asyncio.new_event_loop()
PID.change_controller ( pid)
Change the manipulated variable (MV) for the PID controller.
Arguments:
pid: The PID controller.
PID.change_procvar ( pid)
Change the process variable (PV) for the PID controller.
Arguments:
pid: The PID controller.
PID.delete_timer ( timer)
Delete a timer.
Arguments:
timer: The timer to delete.
PID.have_connection ( client, allpids)
Handle a successful connection.
Arguments:
client: The DataHub client.
allpids: List of all PID controllers.
PID.lost_connection ( client, allpids)
Handle a lost connection.
Arguments:
client: The DataHub client.
allpids: List of all PID controllers.
PID.main ( loop)
Main function to run the PID controllers.
Arguments:
loop: The event loop.
PID.output_point ( pid, name, value)
Output a point value.
Arguments:
pid: The PID controller.
name: The name of the point.
value: The value to output.
PID.outputControlPoints ( client, pid)
Output control points for the PID controller.
Arguments:
client: The DataHub client.
pid: The PID controller.
PID.pid_calculate ( pid)
Calculate the manipulated variable (MV) for the PID controller.
Arguments:
pid: The PID controller.
Returns:
float: The calculated MV.
PID.pid_calculate_procvar ( pid)
Calculate the process variable (PV) for the PID controller.
Arguments:
pid: The PID controller.
Returns:
float: The calculated PV.
PID.pid_create_points ( client, pid)
Create points for the PID controller.
Arguments:
client: The DataHub client.
pid: The PID controller.
PID.qualify ( client, pointname)
Qualify a point name with the client's domain.
Arguments:
client: The DataHub client.
pointname: The point name to qualify.
Returns:
str: The qualified point name.
PID.recalculate_dt ( pid)
Recalculate the time delta (dt) for the PID controller.
Arguments:
pid: The PID controller.
PID.register_pid ( client, pid, is_register)
Register or unregister points for the PID controller.
Arguments:
client: The DataHub client.
pid: The PID controller.
is_register: Whether to register or unregister the points.
PID.RegisterPointChangeCallback ( pid, sym, dhclient)
Register a callback for point change events.
Arguments:
pid: The PID controller.
sym: The symbol name.
dhclient: The DataHub client.
PID.reset_timer ( loop, client, pid, timeoutSecs)
Reset the timers for the PID controller.
Arguments:
loop: The event loop.
client: The DataHub client.
pid: The PID controller.
timeoutSecs: The timeout in seconds.
PID.start_client ( loop, host, port, domain, name, allpids)
Start a DataHub client.
Arguments:
loop: The event loop.
host: The host address.
port: The port number.
domain: The domain name.
name: The name of the client.
allpids: List of all PID controllers.
Returns:
MyConnection: The started client.
str PID.unqualifyName (str pointname)
Remove the domain prefix from a point name.
pointname: The qualified point name.
Returns:
str: The unqualified point name.
PID.update_pids ( pid)
Update the PID controller.
Arguments:
pid: The PID controller.
PID.update_setpoint ( pid)
Update the setpoint (SP) for the PID controller.
Arguments:
pid: The PID controller.
PID.updateOnPointChange ( point, name, pid, dhclient)
Update PID attributes based on point changes.
Arguments:
point: The point that changed.
name: The name of the attribute to update.
pid: The PID controller.
dhclient: The DataHub client.