These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application. More...
Data Structures | |
struct | PBV_Datatype_TX_t |
More... | |
struct | PBV_Datatype_RX_t |
More... | |
Enumerations | |
enum | PBV_SIGNAL_ASCII_MODE { PBV_SIGNAL_MODE = 0 , PBV_ASCII_MODE = 1 } |
< includes More... | |
enum | PBV_MESSAGE_TX_STATE { PBV_MESSAGE_TRANSMITTED = 0 , PBV_MESSAGE_INIT = 1 , PBV_MESSAGE_TRANSMIT_START = 2 , PBV_MESSAGE_TRANSMITTING = 3 , PBV_MESSAGE_TX_ERROR = 4 } |
Power Board Visualizer TX Object transmission states. More... | |
enum | PBV_MESSAGE_RX_STATE { PBV_MESSAGE_RECEIVED = 0 , PBV_MESSAGE_READY_TO_RECEIVE = 1 , PBV_STATE_RECEIVING = 2 , PBV_MESSAGE_RX_ERROR = 3 } |
Power Board Visualizer RX Object Receiving states. More... | |
Functions | |
void | PBV_Change_from_Sixteen_to_Eight (uint16_t *sixteenPtr, uint8_t *eightPtr, uint16_t length) |
This function changes 16 bit data to 8 bit data. | |
void | PBV_Change_from_Eight_to_Sixteen (uint8_t *eightPtr, uint16_t *sixteenPtr, uint16_t length) |
This function changes 8 bit data to sixteen bit data. | |
void | App_PBV_Init (PBV_Datatype_TX_t *boardToPbv, PBV_Datatype_TX_t *boardToPpvAscii, PBV_Datatype_RX_t *pbvToBoard) |
Initializes the PBV init, by linking the application object pointers from the application to CAN or UART data types. | |
void | App_PBV_Re_Init (PBV_Datatype_TX_t *ptr) |
Reinitializes the objects if any parameters( ID, length, etc) are to be changed to the CAN or UART objects. | |
void | App_Receive_From_PBV (PBV_Datatype_RX_t *ptr) |
This function changes the state of the application object. this acts as a trigger for the periodic task to receive data. | |
void | App_Send_To_PBV (PBV_Datatype_TX_t *ptr) |
This function links the data from application object to the CAN or UART object and This function changes the state of the application object. | |
int | App_Read_Received_From_PBV (PBV_Datatype_RX_t *ptr) |
This function links the data received by CAN or UART objects to the application object. | |
static void | App_PBV_Task (void) |
Main application task for Power Board Visualizer. | |
void | App_PBV_Task_10ms () |
task to be executed every 10ms | |
void | App_PBV_Task_100us () |
Task to be executed every 100 us. | |
Variables | |
const APP_PBV_INTF_API_t | appPbvFuncs |
< Includes | |
static PBV_Datatype_TX_t * | appSystemToPbvPtr |
pointer to the PBV_Datatype_TX_t object that will be passed from the application. | |
static PBV_Datatype_RX_t * | appPbvToSystemPtr |
pointer to the PBV_Datatype_RX_t object that will be passed from the application. | |
These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application.
enum PBV_MESSAGE_RX_STATE |
These states are used to keep track of the receiving of messages
Definition at line 49 of file PBV_interface.h.
enum PBV_MESSAGE_TX_STATE |
These states are used to keep track of the transmission of message
Definition at line 33 of file PBV_interface.h.
Power Board Visualizer TX type
This type defines if the TX Object is transmitting numbers or ASCII
Enumerator | |
---|---|
PBV_SIGNAL_MODE | Object will transmit/receive signals. |
PBV_ASCII_MODE | Object will transmit Ascii data. |
Definition at line 21 of file PBV_interface.h.
void App_PBV_Init | ( | PBV_Datatype_TX_t * | boardToPbv, |
PBV_Datatype_TX_t * | boardToPpvAscii, | ||
PBV_Datatype_RX_t * | pbvToBoard | ||
) |
PBV_Datatype_TX_t | * - ptr to numerical data |
PBV_Datatype_TX_t | * - ptr to ascii data |
PBV_Datatype_RX_t | * - ptr to data from pbv |
Initializes the PBV init, by linking the application object pointers from the application to CAN or UART data types
Definition at line 103 of file PBV_interface.c.
void App_PBV_Re_Init | ( | PBV_Datatype_TX_t * | ptr | ) |
PBV_Datatype_TX_t | * - ptr to numerical data |
Reinitializes the objects if any parameters( ID, length, etc) are to be changed to the CAN or UART objects.
Definition at line 122 of file PBV_interface.c.
|
static |
none |
Main application task. this looks at the states of the TX and RX pointers, and if the states are changed for RX/TX then executes TX and RX.
Definition at line 196 of file PBV_interface.c.
void App_PBV_Task_100us | ( | void | ) |
task that is to be executed every 100 us (UART) for executing UART State machine. calling task has to ensure that the system is not overloaded
Definition at line 244 of file PBV_interface.c.
void App_PBV_Task_10ms | ( | void | ) |
none |
task that is to be executed every 100 ms (CAN msg) can work on slower task as mcc implements a queuing buffer
Definition at line 229 of file PBV_interface.c.
int App_Read_Received_From_PBV | ( | PBV_Datatype_RX_t * | ptr | ) |
PBV_Datatype_RX_t | * - ptr |
This function links the data received by CAN or UART objects to the application object
Definition at line 182 of file PBV_interface.c.
void App_Receive_From_PBV | ( | PBV_Datatype_RX_t * | ptr | ) |
PBV_Datatype_RX_t | * - ptr to numerical data |
This function changes the state of the application object. this acts as a trigger for the periodic task to receive data
Definition at line 139 of file PBV_interface.c.
void App_Send_To_PBV | ( | PBV_Datatype_TX_t * | ptr | ) |
PBV_Datatype_TX_t | * - ptr |
This function links the data from application object to the CAN or UART object and
This function changes the state of the application object. This acts as a trigger for the periodic task to send data
Definition at line 158 of file PBV_interface.c.
void PBV_Change_from_Eight_to_Sixteen | ( | uint8_t * | eightPtr, |
uint16_t * | sixteenPtr, | ||
uint16_t | length | ||
) |
sixteenPtr | - ptr to sixteen bit data |
eightPtr | - ptr to eigtht bit data |
length | - length of eight bit |
This function changes 8 bit data to sixteen bit data
Definition at line 64 of file PBV_interface.c.
void PBV_Change_from_Sixteen_to_Eight | ( | uint16_t * | sixteenPtr, |
uint8_t * | eightPtr, | ||
uint16_t | length | ||
) |
<>
sixteenPtr | - ptr to sixteen bit data |
eightPtr | - ptr to eigtht bit data |
length | - length of sixteen bit |
This function changes 16 bit data to 8 bit data
Definition at line 46 of file PBV_interface.c.
|
extern |
This structure has the function pointers that links to the interfaces from CAN or UART depending upon the selection in config.h
< Includes
Definition at line 26 of file PBV_config.c.
|
static |
Definition at line 27 of file PBV_interface.c.
|
static |
Definition at line 19 of file PBV_interface.c.