104 #define BOOTSTRAP_CONFIG_SERVER_URI_SIZE (256) 105 #define BOOTSTRAP_CONFIG_PUBLIC_KEY_SIZE (128) 106 #define BOOTSTRAP_CONFIG_SERVER_KEY_SIZE (128) 107 #define BOOTSTRAP_CONFIG_SECRET_KEY_SIZE (128) 108 #define BOOTSTRAP_CONFIG_BINDING_SIZE (10) 205 void ** dataPointer,
size_t * dataSize,
bool * changed);
450 uint16_t minimumInstances, uint16_t maximumInstances);
indicates the specified object, object instance or resource does not exist
Definition: static.h:158
AwaError
API Error Codes.
Definition: error.h:38
AwaClientRegistrationStatus AwaStaticClient_GetRegistrationStatus(AwaStaticClient *client)
Retrieve register status for the Awa Static Client.
indicates the requested target was created successfully
Definition: static.h:150
AwaError AwaStaticClient_CreateObjectInstance(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID)
Create an object instance within the specified object.
#define BOOTSTRAP_CONFIG_BINDING_SIZE
Maximum length in characters of Binding string.
Definition: static.h:108
indicates a request to create a resource
Definition: static.h:82
Provides definitions for types and enums used by Awa LWM2M API and Static API.
indicates Pre-Shared Key security mode (PSK)
Definition: static.h:98
AwaError AwaStaticClient_DefineObject(AwaStaticClient *client, AwaObjectID objectID, const char *objectName, uint16_t minimumInstances, uint16_t maximumInstances)
Define a new custom LWM2M object.
AwaError AwaStaticClient_DeleteObjectInstance(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID)
Delete an object instance within the specified object.
indicates an invalid argument or request to create an entity that already exists
Definition: static.h:155
indicates a successful read from a resource
Definition: static.h:153
#define BOOTSTRAP_CONFIG_PUBLIC_KEY_SIZE
Maximum size in bytes of Public Key / Identity opaque value.
Definition: static.h:105
AwaResult(* AwaStaticClientHandler)(AwaStaticClient *client, AwaOperation operation, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID, AwaResourceID resourceID, AwaResourceInstanceID resourceInstanceID, void **dataPointer, size_t *dataSize, bool *changed)
A user-specified callback handler for a LWM2M Operation on the specified /O/I/R/i path to an LWM2M en...
Definition: static.h:203
AwaError AwaStaticClient_SetApplicationContext(AwaStaticClient *client, void *context)
Set a user-specified application context which is accessible to any defined callback handler owned by...
indicates a request to delete an object instance
Definition: static.h:78
indicates a successful write to a resource
Definition: static.h:152
int AwaResourceInstanceID
Definition: types.h:46
AwaStaticClient * AwaStaticClient_New(void)
Allocate and return a pointer to a new Awa Static Client.
AwaError AwaStaticClient_DeleteResource(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID, AwaResourceID resourceID)
Delete an optional resource within the specified object instance.
AwaError AwaStaticClient_SetEndPointName(AwaStaticClient *client, const char *endPointName)
Set the client endpoint name.
AwaError AwaStaticClient_ResourceChanged(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID, AwaResourceID resourceID)
Mark the specified resource as changed, in order for the Awa Static Client to send notifications to a...
indicates the requested operation completed successfully
Definition: static.h:149
AwaClientRegistrationStatus
Definition: types.h:185
#define BOOTSTRAP_CONFIG_SECRET_KEY_SIZE
Maximum size in bytes of Secret Key opaque value.
Definition: static.h:107
indicates an attempt to call the requested operation with insufficient authorisation ...
Definition: static.h:156
int Lifetime
Specify the lifetime of the registration in seconds.
Definition: static.h:135
AwaError AwaStaticClient_SetResourceStorageWithPointer(AwaStaticClient *client, AwaObjectID objectID, AwaResourceID resourceID, void *dataPointer, size_t dataElementSize, size_t dataStepSize)
Set a resource's storage with a pointer to the resource's data, leaving handling of the resource to t...
indicates a requested accept-header was not acceptable by the client daemon
Definition: static.h:160
indicates a request to read from a resource
Definition: static.h:79
AwaError AwaStaticClient_SetCoAPListenAddressPort(AwaStaticClient *client, const char *address, int port)
Set the address and port to listen on for incoming CoAP packets.
AwaError AwaStaticClient_Init(AwaStaticClient *client)
Initialise an Awa Static client.
AwaContentType
Definition: types.h:170
Provides definitions for Awa LWM2M Client and Server API error codes and error function declarations...
indicates a request to delete a resource
Definition: static.h:83
struct _AwaStaticClient AwaStaticClient
Represents an Awa Static Client context, holding the necessary information to initialise the client d...
Definition: static.h:91
AwaSecurityMode
Supported LWM2M security modes.
Definition: static.h:96
int AwaObjectInstanceID
Definition: types.h:44
AwaOperation
Supported operations for resource and object handlers defined with AwaStaticClient_DefineResource.
Definition: static.h:75
indicates a request to create an object instance
Definition: static.h:77
void AwaStaticClient_Free(AwaStaticClient **client)
Free an Awa Static Client.
AwaResourceOperations
Supported resource operations for management servers.
Definition: types.h:133
int AwaStaticClient_Process(AwaStaticClient *client)
Process the Awa Static Client.
AwaError AwaStaticClient_DefineResource(AwaStaticClient *client, AwaObjectID objectID, AwaResourceID resourceID, const char *resourceName, AwaResourceType resourceType, uint16_t minimumInstances, uint16_t maximumInstances, AwaResourceOperations operations)
Define a new resource as part of a defined object.
#define BOOTSTRAP_CONFIG_SERVER_URI_SIZE
Maximum size in characters of Server URI string.
Definition: static.h:104
AwaError AwaStaticClient_ObjectInstanceChanged(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID)
Mark the specified object instance as changed, in order for the Awa Static Client to send notificatio...
indicates an attempt to define an already defined object or resource
Definition: static.h:165
#define BOOTSTRAP_CONFIG_SERVER_KEY_SIZE
Maximum size in bytes of Server Key opaque value.
Definition: static.h:106
indicates the requested target was deleted successfully
Definition: static.h:151
int DisableTimeout
Specify the period to disable the Server.
Definition: static.h:138
indicates the handler did not have sufficient memory to service the requested operation ...
Definition: static.h:164
indicates Raw Public Key security mode (RPK)
Definition: static.h:99
int DefaultMinPeriod
Specify the default value the LWM2M Client should use for the Minimum Period of an Observation in the...
Definition: static.h:136
indicates the requested operation is not supported by the called handler
Definition: static.h:168
void * AwaStaticClient_GetApplicationContext(AwaStaticClient *client)
Retrieve a user-specified application context as a void pointer.
indicates No Security mode
Definition: static.h:101
AwaError AwaStaticClient_SetResourceStorageWithPointerArray(AwaStaticClient *client, AwaObjectID objectID, AwaResourceID resourceID, void *dataPointers[], size_t dataElementSize)
Set a resource's storage with an array of pointers to non-contiguous data, where each piece of data s...
const void * AwaStaticClient_GetResourceInstancePointer(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID, AwaResourceID resourceID, AwaResourceInstanceID resourceInstanceID, size_t *resourceSize)
Retrieve a pointer to a resource instance's data, when defined with AwaStaticClient_SetResourceStorag...
AwaError AwaStaticClient_SetResourceOperationHandler(AwaStaticClient *client, AwaObjectID objectID, AwaResourceID resourceID, AwaStaticClientHandler handler)
Set a user-specified callback handler that will be called whenever a LWM2M operation on the resource ...
indicates Certificate-based security mode
Definition: static.h:100
void AwaStaticClient_SetDefaultContentType(AwaContentType contentType)
Set the default content type to use when a request doesn't specify via accept header a preferred cont...
AwaContentType AwaStaticClient_GetDefaultContentType(void)
Retrieve default content type to use when a request doesn't specify via accept header a preferred con...
void AwaStaticClient_SetCertificate(AwaStaticClient *client, const uint8_t *certificate, int certificateLength, AwaCertificateFormat format)
Configure default certificate to use when Awa Static Client connects to a secure Server/Bootstrap.
indicates the requested operation is not allowed for the specified target
Definition: static.h:159
AwaError AwaStaticClient_SetBootstrapServerURI(AwaStaticClient *client, const char *bootstrapServerURI)
Set the network location of a trusted LWM2M Bootstrap server, in the URI format: "coap://[address]:[p...
int DefaultMaxPeriod
Specify the default value the LWM2M Client should use for the Maximum Period of an Observation in the...
Definition: static.h:137
AwaError AwaStaticClient_CreateResource(AwaStaticClient *client, AwaObjectID objectID, AwaObjectInstanceID objectInstanceID, AwaResourceID resourceID)
Create an optional resource within the specified object instance.
int AwaObjectID
Definition: types.h:43
indicates a request to write to a resource
Definition: static.h:81
indicates an attempt to define an object that does not match the existing definition ...
Definition: static.h:166
indicates an attempt to create an existing resource or object instance
Definition: static.h:167
AwaSecurityMode SecurityMode
Specifies the LWM2M Security Mode.
Definition: static.h:123
AwaLogLevel
Supported log levels for a log command.
Definition: types.h:150
int AwaResourceID
Definition: types.h:45
AwaResult
Supported result codes for handler callbacks.
Definition: static.h:147
indicates the requested operation was ignored by the called handler
Definition: static.h:169
void AwaStaticClient_SetPSK(AwaStaticClient *client, const char *identity, const uint8_t *key, int keyLength)
Configure default PSK to use when Awa Static Client connects to a secure Server/Bootstrap.
AwaResourceType
Supported resource types.
Definition: types.h:101
indicates a request to create an object instance
Definition: static.h:157
indicates the handler failed internally while processing a request
Definition: static.h:162
indicates a request to write to a resource
Definition: static.h:80
bool Notification
Specify Notification Storing When Disabled or Offline: if true, the LWM2M Client stores “Notify” op...
Definition: static.h:139
AwaError AwaStaticClient_SetObjectOperationHandler(AwaStaticClient *client, AwaObjectID objectID, AwaStaticClientHandler handler)
Set the Object Operation handler function, to be called by the LWM2M Client when object instances are...
AwaCertificateFormat
Supported Certificate formats.
Definition: types.h:162
Information required to bootstrap the client daemon from a factory configuration. ...
Definition: static.h:114
AwaError AwaStaticClient_SetLogLevel(AwaLogLevel level)
Set the client log level.
AwaError AwaStaticClient_SetFactoryBootstrapInformation(AwaStaticClient *client, const AwaFactoryBootstrapInfo *factoryBootstrapInformation)
Configure factory bootstrap by supplying LWM2M Server Bootstrap Information to register with a LWM2M ...