gxdn

Disconnect control

Disconnect control object is used to manage an internal or external disconnect unit.

Properties

  • 1. Logical Name
    Logical name of the object.
  • 2. Output state
    Actual physical state.
  • 3. Control state
    Internal state.
  • 4. Control mode
    Defines how disconnect can be used. (local, remote,both or neighter).

Actions

  • 1. Remote disconnect
    Remote disconnect.
  • 2. Remote reconnect
    Remote reconnect.

This example forces the disconnect control object into 'disconnected' state if remote disconnection is enabled.

GXReplyData reply = new GXReplyData();
GXDLMSDisconnectControl dc = new GXDLMSDisconnectControl();
readDataBlock(dc.remoteDisconnect(client), reply);
GXReplyData reply = new GXReplyData();
GXDLMSDisconnectControl dc = new GXDLMSDisconnectControl();
ReadDataBlock(dc.RemoteDisconnect(client), reply);
reply := TGXReplyData.Create();
dc = TGXDLMSDisconnectControl.Create();
ReadDataBlock(dc.RemoteDisconnect(client), reply);
CGXReplyData reply;
CGXDLMSDisconnectControl dc;
ReadDataBlock(dc.RemoteDisconnect(client), reply);
int ret;
message messages;
gxReplyData reply;
gxDisconnectControl dc;
dlmsVARIANT params;
const unsigned char ln[6] = { 0,0,96,3,10,255 };
GX_INT8(params, 0);
if ((ret = INIT_OBJECT(dc, DLMS_OBJECT_TYPE_DISCONNECT_CONTROL, ln)) == 0)
{
    mes_init(&messages);
    reply_init(&reply);
    if ((ret = cl_method(&connection->settings, BASE(dc), 1, &params, &messages)) != 0 ||
        (ret = com_readDataBlock(connection, &messages, &reply)) != 0)
    {
        printf("Method failed %s\r\n", hlp_getErrorMessage(ret));
    }
    var_clear(&params);
    mes_clear(&messages);
    reply_clear(&reply);
}
reply = GXReplyData()
dc = GXDLMSDisconnectControl()
self.readDataBlock(dc.remoteDisconnect(client), reply)