Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
Fixing Alignment Issues in Client-SDK (#53)
Browse files Browse the repository at this point in the history
Fixing Alignment Issues in Client-SDK(API-Reference Doc).
Issue #46.

Signed-off-by: Davis Benny <davis.benny@intel.com>
Signed-off-by: Behera, Tushar Ranjan <tushar.ranjan.behera@intel.com>
  • Loading branch information
DukeDavis12 authored Sep 4, 2020
1 parent 4556d0d commit 4675e14
Showing 1 changed file with 46 additions and 39 deletions.
85 changes: 46 additions & 39 deletions docs/client-sdk/client-sdk-api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ This type is returned by all APIs and indicates whether the API call succeeded o
_**Syntax**_
```
typedef enum {
SDO_SUCCESS = 0,
SDO_INVALID_PATH,
SDO_CONFIG_NOT_FOUND,
SDO_INVALID_STATE,
SDO_RESALE_NOT_SUPPORTED,
SDO_RESALE_NOT_READY,
SDO_WARNING,
SDO_ERROR
SDO_ABORT
SDO_SUCCESS = 0,
SDO_INVALID_PATH,
SDO_CONFIG_NOT_FOUND,
SDO_INVALID_STATE,
SDO_RESALE_NOT_SUPPORTED,
SDO_RESALE_NOT_READY,
SDO_WARNING,
SDO_ERROR,
SDO_ABORT
} sdoSdkStatus;
```
_**Members**_
Expand Down Expand Up @@ -48,11 +48,11 @@ This type indicates the current SDO protocol status of the device.
_**Syntax**_
```
typedef enum {
SDO_STATE_PRE_DI = 2,
SDO_STATE_PRE_TO1,
SDO_STATE_IDLE,
SDO_STATE_RESALE,
SDO_STATE_ERROR
SDO_STATE_PRE_DI = 2,
SDO_STATE_PRE_TO1,
SDO_STATE_IDLE,
SDO_STATE_RESALE,
SDO_STATE_ERROR
} sdoSdkDeviceStatus;
```
_**Members**_
Expand All @@ -74,11 +74,11 @@ This type is passed from the SDK to the Application when an error occurs and ind
_**Syntax**_
```
typedef enum {
SDO_RV_TIMEOUT = 1,
SDO_CONN_TIMEOUT,
SDO_DI_ERROR,
SDO_TO1_ERROR,
SDO_TO2_ERROR
SDO_RV_TIMEOUT = 1,
SDO_CONN_TIMEOUT,
SDO_DI_ERROR,
SDO_TO1_ERROR,
SDO_TO2_ERROR
} sdoSdkError;
```
_**Members**_
Expand All @@ -100,12 +100,12 @@ This type value indicates the type of function the module callback must perform.
_**Syntax**_
```
typedef enum {
SDO_SI_START,
SDO_SI_GET_DSI_COUNT,
SDO_SI_SET_PSI,
SDO_SI_GET_DSI,
SDO_SI_SET_OSI,
SDO_SI_END,
SDO_SI_START,
SDO_SI_GET_DSI_COUNT,
SDO_SI_SET_PSI,
SDO_SI_GET_DSI,
SDO_SI_SET_OSI,
SDO_SI_END,
SDO_SI_FAILURE
} sdoSdkSiType;
```
Expand Down Expand Up @@ -134,8 +134,8 @@ This type contains a key name string and associated value string. Both items are
_**Syntax**_
```
typedef struct sdoSdkSiKeyValue {
char *key;
char *value;
char *key;
char *value;
} sdoSdkSiKeyValue;
```
_**Members**_
Expand All @@ -153,9 +153,11 @@ This callback function is invoked in the context of the executing onboarding pro
_**Syntax**_

```
typedef int (*sdoSdkServiceInfoCB)(sdoSdkSiType type,
int *count,
sdoSdkSiKeyValue *si);
typedef int (*sdoSdkServiceInfoCB)(
sdoSdkSiType type,
int *count,
sdoSdkSiKeyValue *si
);
```

_**Parameters**_
Expand All @@ -182,8 +184,8 @@ This structure describes a Service Information module that implements module fun
_**Syntax**_
```
typedef struct {
char moduleName[16];
sdoSdkServiceInfoCB serviceInfoCallback;
char moduleName[16];
sdoSdkServiceInfoCB serviceInfoCallback;
} sdoSdkServiceInfoModule;
```
_**Members**_
Expand All @@ -198,15 +200,17 @@ This type is a pointer to a callback function that is used to process errors dur

_**Syntax**_
```
typedef int (*sdoSdkErrorCB)(sdoSdkStatus type,
sdoSdkError errorCode);
typedef int (*sdoSdkErrorCB)(
sdoSdkStatus type,
sdoSdkError errorCode
);
```

_**Parameters**_

**type**
This value specifies the type of error that occurred. It will be one of the following values (other `sdoSdkStatus` values are not used here):
* `SDO_ERROR`: This indicates an unrecoverable error occurred. The SDK will continue with protocol restart for these types of errors but it is unlikely that the operation will succeed. It is advisable to abort the operation and retry later.
* `SDO_ERROR`: This indicates an unrecoverable error occurred. The SDK will continue with protocol restart for these types of errors but it is unlikely that the operation will succeed. It is advisable to abort the operation and retry later.
* `SDO_WARNING`: This indicates that a transient error occurred. The SDK will continue with protocol restart, which might fix the problem. It is advisable that the Application allows the restart to take place.
**errorCode**
This value indicates details of the error that occurred. See description in SDO SDK Error Values.
Expand All @@ -230,17 +234,20 @@ The Application must invoke this API before any other APIs since this API initia
_**Syntax**_
```
sdoSdkStatus sdoSdkInit(
sdoSdkErrorCB *errorHandlingCallback,
uint32_t numModules,
sdoSdkModuleInfo *moduleInformation,
sdoSdkErrorCB *errorHandlingCallback,
uint32_t numModules,
sdoSdkModuleInfo *moduleInformation,
);
```

_**Parameters**_
_**Parameters**_

**errorHandlingCallback**

This is the Application’s error handling function and will be called by the SDK when an error is encountered. This value can be `NULL` in which case, errors will not be reported to the Application, and the SDK will take the appropriate recovery and/or restart action as required.

***Note:*** Passing `NULL` might cause the SDK to remain in an infinite loop until the onboarding process completes successfully.

**numModules**
Number of Service Information modules contained in the following `moduleInformation` list parameter. If no Application-specific modules are available, this value should be zero.
**moduleInformation**
Expand Down

0 comments on commit 4675e14

Please sign in to comment.