This Page

backend.daemon — SEER daemon core

class backend.daemon.ChainedProcessor(next)

Allow a chain of processors to process the message as well as pass down info from the main loop for connection info and periodic scheduling

connectStateChanged(connected)
passMessage(msg)
periodic(now)
processMessage(msg)
runConnectStateChanged(connected)
runPeriodic(now)
class backend.daemon.Daemon(src, cafile, nodefile, multicast, localip)
Responsible for receiving/sending data from/to the controller. Input processing is:
Rx -> Serializer -> Scheduler -> Dispatcher
loop()

Thread main

sendToController(msg)

Provide a jumping point for enqueing messages to be sent, check for valid outgoing socket and atta current processes serial value

class backend.daemon.Dispatcher(comm)

The real work of dispatching COMMAND, GET and PUT messages to the modules and agents

connectStateChanged(connected)
getReceivingAgent(type, group)

Get the requested agent object from the double hashtable. Create an new agent if one doesn’t exist. grouplist structure is { typename:{groupname:agentobj} }

loadModules(builtin, plugin)
periodic(now)
processCOMMAND(cmd)
processMessage(msg)

Passed from processor above us, dispatch to agents to to readers

class backend.daemon.Scheduler(next)

Only passes messages if the current time is greater the msg.time header. If the time header doesn’t exist, they are passed right away

periodic(now)

Fire any events are ready to go, return the time until the next event when nothing else ready

processMessage(msg)
class backend.daemon.Serializer(next)

Only passes messages on if they are in order according to msg.serial. If the header value doesn’t exist, they get passed right away

connectStateChanged(connected)
processMessage(msg)

Pass messages onto the next processor but only if they has arrived in serial order. If we get a repeated message (retransmit multicast) we drop it, if we get something ‘from the future’, it stays queued until we get the previous ids

backend.daemon.forceint(v)