Single action schedule object is used to execute selected script in given time.
Properties
-
1. Logical Name
Logical name of the object.
-
2. Executed script
Script to execute.
-
3. Type
Execution type.
-
4. Execution time
List of script execution times.
Note! Time zone or Daylight Saving Time info is not send in part of the execution time. Some meters are executing this using meter's time and some as EPOCH time.
Actions
There are no actions available for this object type.Access data from ANSI C
//Add new action schedule. unsigned char target[6] = { 0, 1, 10, 1, 101,255 }; gxtime* tm; const unsigned char ln[6] = { 0,0,15,0,0,255 }; cosem_init2((gxObject*)&actionSchedule, DLMS_OBJECT_TYPE_ACTION_SCHEDULE, ln); memcpy(actionSchedule.executedScriptLogicalName, target, 6); actionSchedule.executedScriptSelector = 1; actionSchedule.type = DLMS_SINGLE_ACTION_SCHEDULE_TYPE1; //Add new execution time to the list. tm = (gxtime*)malloc(sizeof(gxtime)); time_now(tm); arr_push(&actionSchedule.executionTime, tm);
//How to access action schedule data. int pos = 0, ret; gxtime* tm; hlp_printLogicalName("Name: %s\r\n", object->executedScriptLogicalName); printf("Executed Script Selector: %d\n",object->executedScriptSelector); printf("Type: %d\n", object->type); for (pos = 0; pos != object->executionTime.size; ++pos) { ret = arr_getByIndex(&object->executionTime, pos, (void**)&tm); if (ret != DLMS_ERROR_CODE_OK) { break; } time_print(tm); }