Communication networks (comm)
[Programmable logic controllers (plc)]


Detailed Description

Messages are sent from one PLC object to another using PLC code.

The following functions are available to send and receive messages.

Each communications networks is defined by a single object that handles all messages between PLC objects linked to it. The network has the following properties


Classes

class  comm
class  Message
class  Queue

Functions

void Queue::add (Message *msg)
 comm::comm (MODULE *mod)
 Register the new object class and construct the default object properties.
int comm::create ()
 Create a new object.
EXPORT int create_comm (OBJECT **obj, OBJECT *parent)
MessageQueue::drop (Message *msg, bool reverse=false)
int comm::init (OBJECT *parent)
 Initialize the new object.
EXPORT int init_comm (OBJECT *obj)
MessageQueue::next (Message *msg)
TIMESTAMP Queue::next_delivery_time (void)
MessageQueue::peek (void)
 Queue::Queue ()
static void comm::route (comm *net, Message *msg)
TIMESTAMP comm::sync (TIMESTAMP t0)
 Synchronize the object.
EXPORT TIMESTAMP sync_comm (OBJECT *obj, TIMESTAMP t0)
MessageQueue::take (Message *msg=NULL)
 Queue::~Queue ()

Variables

static commcomm::defaults = NULL
 a pointer to the default values for new objects
static CLASScomm::oclass = NULL
 a pointer to the registered object class definition


GridLAB-DTM Version 1.0
An open-source project initiated by the US Department of Energy