Bar Logo Dual Active Bridge Development Board (Part-No. )
 
Content
     
Loading...
Searching...
No Matches

These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application. More...

+ Collaboration diagram for PBV Interface:

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_tappSystemToPbvPtr
 pointer to the PBV_Datatype_TX_t object that will be passed from the application.
 
static PBV_Datatype_RX_tappPbvToSystemPtr
 pointer to the PBV_Datatype_RX_t object that will be passed from the application.
 

Detailed Description

These implement the PBV state machine of RX and TX, as well as link data that is received by peripherals to application.

Enumeration Type Documentation

◆ PBV_MESSAGE_RX_STATE

These states are used to keep track of the receiving of messages

Enumerator
PBV_MESSAGE_RECEIVED 

Message Received.

PBV_MESSAGE_READY_TO_RECEIVE 

Message Reception triggered.

PBV_STATE_RECEIVING 

Message beinf received.

PBV_MESSAGE_RX_ERROR 

if some error happens (CRC ?)

Definition at line 49 of file PBV_interface.h.

◆ PBV_MESSAGE_TX_STATE

These states are used to keep track of the transmission of message

Enumerator
PBV_MESSAGE_TRANSMITTED 

Message transmitted. successful transmit.

PBV_MESSAGE_INIT 

Init State. Only Send Messages in this State

PBV_MESSAGE_TRANSMIT_START 

Start Transmitting message.

PBV_MESSAGE_TRANSMITTING 

Transmitting Message.

PBV_MESSAGE_TX_ERROR 

if some error happens. unsuccessful transmit

Definition at line 33 of file PBV_interface.h.

◆ PBV_SIGNAL_ASCII_MODE

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.

Function Documentation

◆ App_PBV_Init()

void App_PBV_Init ( PBV_Datatype_TX_t boardToPbv,
PBV_Datatype_TX_t boardToPpvAscii,
PBV_Datatype_RX_t pbvToBoard 
)
Parameters
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
Returns
void

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.

+ Here is the caller graph for this function:

◆ App_PBV_Re_Init()

void App_PBV_Re_Init ( PBV_Datatype_TX_t ptr)
Parameters
PBV_Datatype_TX_t* - ptr to numerical data
Returns
void

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.

+ Here is the caller graph for this function:

◆ App_PBV_Task()

static void App_PBV_Task ( void  )
static
Parameters
none
Returns
void

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.

+ Here is the caller graph for this function:

◆ App_PBV_Task_100us()

void App_PBV_Task_100us ( void  )
Returns
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.

+ Here is the call graph for this function:

◆ App_PBV_Task_10ms()

void App_PBV_Task_10ms ( void  )
Parameters
none
Returns
void

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.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ App_Read_Received_From_PBV()

int App_Read_Received_From_PBV ( PBV_Datatype_RX_t ptr)
Parameters
PBV_Datatype_RX_t* - ptr
Returns
void

This function links the data received by CAN or UART objects to the application object

Definition at line 182 of file PBV_interface.c.

+ Here is the caller graph for this function:

◆ App_Receive_From_PBV()

void App_Receive_From_PBV ( PBV_Datatype_RX_t ptr)
Parameters
PBV_Datatype_RX_t* - ptr to numerical data
Returns
void

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.

+ Here is the caller graph for this function:

◆ App_Send_To_PBV()

void App_Send_To_PBV ( PBV_Datatype_TX_t ptr)
Parameters
PBV_Datatype_TX_t* - ptr
Returns
void

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.

+ Here is the caller graph for this function:

◆ PBV_Change_from_Eight_to_Sixteen()

void PBV_Change_from_Eight_to_Sixteen ( uint8_t *  eightPtr,
uint16_t *  sixteenPtr,
uint16_t  length 
)
Parameters
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.

+ Here is the caller graph for this function:

◆ PBV_Change_from_Sixteen_to_Eight()

void PBV_Change_from_Sixteen_to_Eight ( uint16_t *  sixteenPtr,
uint8_t *  eightPtr,
uint16_t  length 
)

<>

Parameters
sixteenPtr- ptr to sixteen bit data
eightPtr- ptr to eigtht bit data
length- length of sixteen bit
Returns
void

This function changes 16 bit data to 8 bit data

Definition at line 46 of file PBV_interface.c.

Variable Documentation

◆ appPbvFuncs

const APP_PBV_INTF_API_t appPbvFuncs
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.

◆ appPbvToSystemPtr

PBV_Datatype_RX_t* appPbvToSystemPtr
static

Definition at line 27 of file PBV_interface.c.

◆ appSystemToPbvPtr

PBV_Datatype_TX_t* appSystemToPbvPtr
static

Definition at line 19 of file PBV_interface.c.