SWARM-Bot Firmware  v1.0
Mobile robot OS - Embedded C/C++
status_codes.h File Reference

Status code definitions. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef enum status_code status_code_t
 

Enumerations

enum  status_code {
  STATUS_OK = 0 , ERR_IO_ERROR = -1 , ERR_FLUSHED = -2 , ERR_TIMEOUT = -3 ,
  ERR_BAD_DATA = -4 , ERR_PROTOCOL = -5 , ERR_UNSUPPORTED_DEV = -6 , ERR_NO_MEMORY = -7 ,
  ERR_INVALID_ARG = -8 , ERR_BAD_ADDRESS = -9 , ERR_BUSY = -10 , ERR_BAD_FORMAT = -11 ,
  ERR_NO_TIMER = -12 , ERR_TIMER_ALREADY_RUNNING = -13 , ERR_TIMER_NOT_RUNNING = -14 , OPERATION_IN_PROGRESS = -128
}
 

Detailed Description

Status code definitions.

This file defines various status codes returned by functions, indicating success or failure as well as what kind of failure.

Copyright (c) 2009-2018 Microchip Technology Inc. and its subsidiaries.

\asf_license_start

Definition in file status_codes.h.

Enumeration Type Documentation

◆ status_code

Status code that may be returned by shell commands and protocol implementations.

Note
Any change to these status codes and the corresponding message strings is strictly forbidden. New codes can be added, however, but make sure that any message string tables are updated at the same time.
Enumerator
STATUS_OK 

Success.

ERR_IO_ERROR 

I/O error.

ERR_FLUSHED 

Request flushed from queue.

ERR_TIMEOUT 

Operation timed out.

ERR_BAD_DATA 

Data integrity check failed.

ERR_PROTOCOL 

Protocol error.

ERR_UNSUPPORTED_DEV 

Unsupported device.

ERR_NO_MEMORY 

Insufficient memory.

ERR_INVALID_ARG 

Invalid argument.

ERR_BAD_ADDRESS 

Bad address.

ERR_BUSY 

Resource is busy.

ERR_BAD_FORMAT 

Data format not recognized.

ERR_NO_TIMER 

No timer available.

ERR_TIMER_ALREADY_RUNNING 

Timer already running.

ERR_TIMER_NOT_RUNNING 

Timer not running.

OPERATION_IN_PROGRESS 

Operation in progress.

This status code is for driver-internal use when an operation is currently being performed.

Note
Drivers should never return this status code to any callers. It is strictly for internal use.
64  {
65  STATUS_OK = 0,
66  ERR_IO_ERROR = -1,
67  ERR_FLUSHED = -2,
68  ERR_TIMEOUT = -3,
69  ERR_BAD_DATA = -4,
70  ERR_PROTOCOL = -5,
71  ERR_UNSUPPORTED_DEV = -6,
72  ERR_NO_MEMORY = -7,
73  ERR_INVALID_ARG = -8,
74  ERR_BAD_ADDRESS = -9,
75  ERR_BUSY = -10,
76  ERR_BAD_FORMAT = -11,
77  ERR_NO_TIMER = -12,
79  ERR_TIMER_NOT_RUNNING = -14,
80 
90  OPERATION_IN_PROGRESS = -128,
91 };
@ ERR_IO_ERROR
I/O error.
Definition: status_codes.h:66
@ ERR_TIMER_NOT_RUNNING
Timer not running.
Definition: status_codes.h:79
@ ERR_NO_MEMORY
Insufficient memory.
Definition: status_codes.h:72
@ ERR_NO_TIMER
No timer available.
Definition: status_codes.h:77
@ ERR_INVALID_ARG
Invalid argument.
Definition: status_codes.h:73
@ ERR_BAD_DATA
Data integrity check failed.
Definition: status_codes.h:69
@ STATUS_OK
Success.
Definition: status_codes.h:65
@ ERR_BUSY
Resource is busy.
Definition: status_codes.h:75
@ OPERATION_IN_PROGRESS
Operation in progress.
Definition: status_codes.h:90
@ ERR_FLUSHED
Request flushed from queue.
Definition: status_codes.h:67
@ ERR_BAD_FORMAT
Data format not recognized.
Definition: status_codes.h:76
@ ERR_BAD_ADDRESS
Bad address.
Definition: status_codes.h:74
@ ERR_UNSUPPORTED_DEV
Unsupported device.
Definition: status_codes.h:71
@ ERR_TIMEOUT
Operation timed out.
Definition: status_codes.h:68
@ ERR_PROTOCOL
Protocol error.
Definition: status_codes.h:70
@ ERR_TIMER_ALREADY_RUNNING
Timer already running.
Definition: status_codes.h:78