Go to the source code of this file.
|
namespace | hal |
| WPILib Hardware Abstraction Layer (HAL) namespace.
|
|
namespace | hal::impl |
|
|
#define | HAL_SIMDATAVALUE_DEFINE_NAME(NAME) |
| Define a name functor for use with SimDataValue. More...
|
|
#define | HAL_SIMDATAVALUE_DEFINE_CAPI(TYPE, NS, CAPINAME, DATA, LOWERNAME) |
| Define a standard C API for simulation data. More...
|
|
#define | HAL_SIMDATAVALUE_DEFINE_CAPI_CHANNEL(TYPE, NS, CAPINAME, DATA, LOWERNAME) |
| Define a standard C API for simulation data (channel variant). More...
|
|
#define | HAL_SIMDATAVALUE_DEFINE_CAPI_NOINDEX(TYPE, NS, CAPINAME, DATA, LOWERNAME) |
| Define a standard C API for simulation data (no index variant). More...
|
|
#define | HAL_SIMDATAVALUE_STUB_CAPI(TYPE, NS, CAPINAME, RETURN) |
| Define a stub standard C API for simulation data. More...
|
|
#define | HAL_SIMDATAVALUE_STUB_CAPI_CHANNEL(TYPE, NS, CAPINAME, RETURN) |
| Define a stub standard C API for simulation data (channel variant). More...
|
|
#define | HAL_SIMDATAVALUE_STUB_CAPI_NOINDEX(TYPE, NS, CAPINAME, RETURN) |
| Define a stub standard C API for simulation data (no index variant). More...
|
|
◆ HAL_SIMDATAVALUE_DEFINE_CAPI
#define HAL_SIMDATAVALUE_DEFINE_CAPI |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
DATA, |
|
|
|
LOWERNAME |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
return DATA[
index].LOWERNAME.RegisterCallback(callback, param, \
initialNotify); \
} \
\
DATA[
index].LOWERNAME.CancelCallback(uid); \
} \
\
TYPE NS##_Get##CAPINAME(
int32_t index) { \
return DATA[
index].LOWERNAME; \
} \
\
void NS##_Set##CAPINAME(
int32_t index, TYPE LOWERNAME) { \
DATA[
index].LOWERNAME = LOWERNAME; \
}
void(* HAL_NotifyCallback)(const char *name, void *param, const struct HAL_Value *value)
Definition: NotifyListener.h:9
int32_t HAL_Bool
Definition: Types.h:73
::int32_t int32_t
Definition: Meta.h:57
Define a standard C API for simulation data.
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
int32_t index, HAL_NotifyCallback callback, void* param,
HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t index, int32_t uid)
- TYPE NS_GetCAPINAME(int32_t index)
- void NS_SetCAPINAME(int32_t index, TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
DATA | the backing data array |
LOWERNAME | the lowercase name of the backing data variable |
◆ HAL_SIMDATAVALUE_DEFINE_CAPI_CHANNEL
#define HAL_SIMDATAVALUE_DEFINE_CAPI_CHANNEL |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
DATA, |
|
|
|
LOWERNAME |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
void* param,
HAL_Bool initialNotify) { \
return DATA[
index].LOWERNAME[channel].RegisterCallback(callback, param, \
initialNotify); \
} \
\
void NS##_Cancel##CAPINAME##Callback(
int32_t index,
int32_t channel, \
DATA[
index].LOWERNAME[channel].CancelCallback(uid); \
} \
\
return DATA[
index].LOWERNAME[channel]; \
} \
\
void NS##_Set##CAPINAME(
int32_t index,
int32_t channel, TYPE LOWERNAME) { \
DATA[
index].LOWERNAME[channel] = LOWERNAME; \
}
Define a standard C API for simulation data (channel variant).
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
int32_t index, int32_t channel, HAL_NotifyCallback callback,
void* param, HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t index, int32_t channel, int32_t uid)
- TYPE NS_GetCAPINAME(int32_t index, int32_t channel)
- void NS_SetCAPINAME(int32_t index, int32_t channel, TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
DATA | the backing data array |
LOWERNAME | the lowercase name of the backing data variable array |
◆ HAL_SIMDATAVALUE_DEFINE_CAPI_NOINDEX
#define HAL_SIMDATAVALUE_DEFINE_CAPI_NOINDEX |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
DATA, |
|
|
|
LOWERNAME |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
return DATA->LOWERNAME.RegisterCallback(callback, param, initialNotify); \
} \
\
void NS##_Cancel##CAPINAME##Callback(
int32_t uid) { \
DATA->LOWERNAME.CancelCallback(uid); \
} \
\
TYPE NS##_Get##CAPINAME(void) { \
return DATA->LOWERNAME; \
} \
\
void NS##_Set##CAPINAME(TYPE LOWERNAME) { \
DATA->LOWERNAME = LOWERNAME; \
}
Define a standard C API for simulation data (no index variant).
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t uid)
- TYPE NS_GetCAPINAME(void)
- void NS_SetCAPINAME(TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
DATA | the backing data pointer |
LOWERNAME | the lowercase name of the backing data variable |
◆ HAL_SIMDATAVALUE_DEFINE_NAME
#define HAL_SIMDATAVALUE_DEFINE_NAME |
( |
|
NAME | ) |
|
Value:
Get##NAME##Name() { \
return #NAME; \
}
#define LLVM_ATTRIBUTE_ALWAYS_INLINE
LLVM_ATTRIBUTE_ALWAYS_INLINE - On compilers where we have a directive to do so, mark a method "always...
Definition: Compiler.h:274
Define a name functor for use with SimDataValue.
This creates a function named GetNAMEName() that returns "NAME".
- Parameters
-
◆ HAL_SIMDATAVALUE_STUB_CAPI
#define HAL_SIMDATAVALUE_STUB_CAPI |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
RETURN |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
return 0; \
} \
\
\
TYPE NS##_Get##CAPINAME(
int32_t index) { \
return RETURN; \
} \
\
void NS##_Set##CAPINAME(
int32_t index, TYPE) {}
Define a stub standard C API for simulation data.
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
int32_t index, HAL_NotifyCallback callback, void* param,
HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t index, int32_t uid)
- TYPE NS_GetCAPINAME(int32_t index)
- void NS_SetCAPINAME(int32_t index, TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
RETURN | what to return from the Get function |
◆ HAL_SIMDATAVALUE_STUB_CAPI_CHANNEL
#define HAL_SIMDATAVALUE_STUB_CAPI_CHANNEL |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
RETURN |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
void* param,
HAL_Bool initialNotify) { \
return 0; \
} \
\
void NS##_Cancel##CAPINAME##Callback(
int32_t index,
int32_t channel, \
\
return RETURN; \
} \
\
Define a stub standard C API for simulation data (channel variant).
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
int32_t index, int32_t channel, HAL_NotifyCallback callback,
void* param, HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t index, int32_t channel, int32_t uid)
- TYPE NS_GetCAPINAME(int32_t index, int32_t channel)
- void NS_SetCAPINAME(int32_t index, int32_t channel, TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
RETURN | what to return from the Get function |
◆ HAL_SIMDATAVALUE_STUB_CAPI_NOINDEX
#define HAL_SIMDATAVALUE_STUB_CAPI_NOINDEX |
( |
|
TYPE, |
|
|
|
NS, |
|
|
|
CAPINAME, |
|
|
|
RETURN |
|
) |
| |
Value: int32_t NS##_Register##CAPINAME##Callback( \
return 0; \
} \
\
void NS##_Cancel##CAPINAME##Callback(
int32_t uid) {} \
\
TYPE NS##_Get##CAPINAME(void) { \
return RETURN; \
} \
\
void NS##_Set##CAPINAME(TYPE) {}
Define a stub standard C API for simulation data (no index variant).
Functions defined:
- int32 NS_RegisterCAPINAMECallback(
HAL_NotifyCallback callback, void* param, HAL_Bool initialNotify)
- void NS_CancelCAPINAMECallback(int32_t uid)
- TYPE NS_GetCAPINAME(void)
- void NS_SetCAPINAME(TYPE value)
- Parameters
-
TYPE | the underlying value type (e.g. double) |
NS | the "namespace" (e.g. HALSIM) |
CAPINAME | the C API name (usually first letter capitalized) |
RETURN | what to return from the Get function |