By Mh.Najafi, 28 February, 2024 Forums Gurux.DLMS Is there any action method code for Security Setup methods (security_activate and global_key_transfer)? Hi, You can do it by calling… Hi, You can do it by calling com_method. Like this: BR, Mikko /** * Activates and strengthens the security policy for the security setup object */ int SecurityActivate(connection* connection, DLMS_SECURITY_POLICY policy) { int ret; gxSecuritySetup ss; unsigned char ln[] = { 0,0,43,0,0,255 }; INIT_OBJECT(ss, DLMS_OBJECT_TYPE_SECURITY_SETUP, ln); //Invokes capture action. dlmsVARIANT param; var_setEnum(¶m, policy); ret = com_method(connection, BASE(ss), 1, ¶m); return ret; } Log in or register to post comments
Hi, You can do it by calling… Hi, You can do it by calling com_method. Like this: BR, Mikko /** * Activates and strengthens the security policy for the security setup object */ int SecurityActivate(connection* connection, DLMS_SECURITY_POLICY policy) { int ret; gxSecuritySetup ss; unsigned char ln[] = { 0,0,43,0,0,255 }; INIT_OBJECT(ss, DLMS_OBJECT_TYPE_SECURITY_SETUP, ln); //Invokes capture action. dlmsVARIANT param; var_setEnum(¶m, policy); ret = com_method(connection, BASE(ss), 1, ¶m); return ret; }
Hi, You can do it by calling…
Hi,
You can do it by calling com_method. Like this:
BR,
Mikko
/**
* Activates and strengthens the security policy
for the security setup object
*/
int SecurityActivate(connection* connection,
DLMS_SECURITY_POLICY policy)
{
int ret;
gxSecuritySetup ss;
unsigned char ln[] = { 0,0,43,0,0,255 };
INIT_OBJECT(ss, DLMS_OBJECT_TYPE_SECURITY_SETUP, ln);
//Invokes capture action.
dlmsVARIANT param;
var_setEnum(¶m, policy);
ret = com_method(connection, BASE(ss), 1, ¶m);
return ret;
}