ConOpSys V2970  P004.07
ANVILEX control operating system
Public Member Functions | Public Attributes | Private Attributes | List of all members
TMODBUS_Request_FIFO Class Reference

MODBUS request FIFO class. More...

#include <MODBUS_Request_FIFO.h>

Collaboration diagram for TMODBUS_Request_FIFO:
Collaboration graph

Public Member Functions

 TMODBUS_Request_FIFO ()
 Class constructor method. More...
 
 ~TMODBUS_Request_FIFO ()
 Class destructor method. More...
 
BOOL Is_Empty ()
 Returns empty buffer status. More...
 
VOID Push (U8 u8_Value)
 Push data into buffer. More...
 
BOOL Pop (U8 *u8_Value, F32 *f32_Interval)
 Pop data from buffer. More...
 

Public Attributes

U8 u8_Data [16] = { (U8)0x00 }
 Data buffer. More...
 
U64 u64_Timestamp [16] = { (U64)0 }
 Timestamp buffer. More...
 
BOOL bool_Status [16] = { (BOOL)false }
 Status code buffer. More...
 
U32 u32_Push_Index = (U32)0
 Push end index. More...
 
U32 u32_Pop_Index = (U32)0
 Pop end index. More...
 

Private Attributes

U64 u64_Last_Pop_Timestamp = (U64)0
 Last pop operation timestamp. More...
 
BOOL bool_Overflow = (BOOL)false
 Overflow flag. More...
 

Detailed Description

MODBUS request FIFO class.

Constructor & Destructor Documentation

◆ TMODBUS_Request_FIFO()

TMODBUS_Request_FIFO::TMODBUS_Request_FIFO ( )

Class constructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.
Todo:
ANVILEX KM: To remove

◆ ~TMODBUS_Request_FIFO()

TMODBUS_Request_FIFO::~TMODBUS_Request_FIFO ( )

Class destructor method.


Note
None
Override
Not allowed
Attention
Don't call this method directly.

Member Function Documentation

◆ Is_Empty()

BOOL TMODBUS_Request_FIFO::Is_Empty ( )

Returns empty buffer status.


Note
None
Returns
BOOL - Buffer status
Return values
false- Buffer is not empty
true- Buffer is empty
Override
Not allowed
Attention
None

References bool_Status, and u32_Pop_Index.

◆ Pop()

BOOL TMODBUS_Request_FIFO::Pop ( U8 u8_Value,
F32 f32_Interval 
)

Pop data from buffer.


Note
None
Parameters
[out]*u8_Value- Poped value from the buffer
[out]*f32_Interval- Time interval value
Returns
BOOL - Execution status
Return values
false- Buffer is empty, no data poped
true- Data successfull poped
Override
Not allowed
Attention
None
Todo:
ANVILEX KM: Use timeout method for more quick calculations

References bool_Status, false, TTIMER2_STM32F429::Get_Actual_Time_U64(), THigh_Precision_Timer_Base::Get_Delta_Time(), Increment_Overflowed(), object_Delay_Timer, u32_Pop_Index, u64_Last_Pop_Timestamp, u64_Timestamp, and u8_Data.

Here is the call graph for this function:

◆ Push()

VOID TMODBUS_Request_FIFO::Push ( U8  u8_Value)

Push data into buffer.


Note
None
Parameters
[in]u8_Value- U8 value to push into buffer
Override
Not allowed
Attention
None

References bool_Overflow, bool_Status, TTIMER2_STM32F429::Get_Actual_Time_U64(), Increment_Overflowed(), object_Delay_Timer, u32_Push_Index, u64_Timestamp, and u8_Data.

Here is the call graph for this function:

Member Data Documentation

◆ bool_Overflow

BOOL TMODBUS_Request_FIFO::bool_Overflow = (BOOL)false
private

Overflow flag.

Referenced by Push().

◆ bool_Status

BOOL TMODBUS_Request_FIFO::bool_Status[16] = { (BOOL)false }

Status code buffer.

Referenced by Is_Empty(), Pop(), and Push().

◆ u32_Pop_Index

U32 TMODBUS_Request_FIFO::u32_Pop_Index = (U32)0

Pop end index.

Referenced by Is_Empty(), and Pop().

◆ u32_Push_Index

U32 TMODBUS_Request_FIFO::u32_Push_Index = (U32)0

Push end index.

Referenced by Push().

◆ u64_Last_Pop_Timestamp

U64 TMODBUS_Request_FIFO::u64_Last_Pop_Timestamp = (U64)0
private

Last pop operation timestamp.

Referenced by Pop().

◆ u64_Timestamp

U64 TMODBUS_Request_FIFO::u64_Timestamp[16] = { (U64)0 }

Timestamp buffer.

Referenced by Pop(), and Push().

◆ u8_Data

U8 TMODBUS_Request_FIFO::u8_Data[16] = { (U8)0x00 }

Data buffer.

Referenced by Pop(), and Push().


The documentation for this class was generated from the following files: