Skip to content

Commit

Permalink
Merge pull request #18 from CreatorKit/dev
Browse files Browse the repository at this point in the history
Merge dev to master
  • Loading branch information
nikhil-zinjurde-imgtec authored Aug 11, 2016
2 parents 99ea171 + 8df9321 commit 0bb0f50
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lwm2m-client-ipso-presence.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ AwaError PresenceObject_DefineObjectsAndResources(AwaStaticClient *awaClient, Aw
}

error = AwaStaticClient_DefineResource(awaClient, IPSO_PRESENCE_OBJECT, IPSO_PRESENCE_DIGITAL_INPUT_COUNTER_RESET, "Digital Input Counter Reset",
AwaResourceType_Opaque, 0, 1, AwaResourceOperations_Execute);
AwaResourceType_None, 0, 1, AwaResourceOperations_Execute);
AwaStaticClient_SetResourceOperationHandler(awaClient, IPSO_PRESENCE_OBJECT, IPSO_PRESENCE_DIGITAL_INPUT_COUNTER_RESET, PresenceObject_Handler);
if (error != AwaError_Success)
{
Expand Down Expand Up @@ -182,6 +182,18 @@ AwaError PresenceObject_DefineObjectsAndResources(AwaStaticClient *awaClient, Aw
}

AwaStaticClient_CreateObjectInstance(awaClient, IPSO_PRESENCE_OBJECT, 0);
error = AwaStaticClient_CreateResource(awaClient, IPSO_PRESENCE_OBJECT, 0, IPSO_PRESENCE_DIGITAL_INPUT_COUNTER_RESET);
if (error != AwaError_Success)
{
printf("Failed to create resource 'Digital Input Counter Reset'\n");
return error;
}
error = AwaStaticClient_CreateResource(awaClient, IPSO_PRESENCE_OBJECT, 0, IPSO_PRESENCE_DIGITAL_INPUT_COUNTER);
if (error != AwaError_Success)
{
printf("Failed to create resource 'Digital Input Counter'\n");
return error;
}
return AwaError_Success;
}

Expand Down

0 comments on commit 0bb0f50

Please sign in to comment.