FB_Queue (Function Block)

A collection whose access/mutation of items is first-in, first-out.

Implements: I_Queue

Properties

_Count

Type: T_Capacity

Number of items in the collection.

_Empty

Type: BOOL

Checks if collection is empty.

_Error_Status

Type: T_Error

Error status of the collection.

_Values

Type: I_Immutable_List

Gets an immutable list of the items in the queue.

Methods

Clear

Empties/Clears/Deletes every item in the queue.

Dequeue

Removes item at the front the queue.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue

Adds item at the back of the queue.

Inputs

Name

Type

Description

Item

ANY

Variable containg data to store on the queue.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue_At_Front

Adds item at the front of the queue.

Inputs

Name

Type

Description

Item

ANY

Variable containg data to store on the queue.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue_Generic

Adds a generic item at the back of the queue.

Inputs

Name

Type

Description

Item

T_Generic

Item to store.

bAt_Front

BOOL

Enqueues at front if set to TRUE.

Outputs

Name

Type

Description

bSuccess

BOOL

Get

Gets the item at the front of the queue.

Inputs

Name

Type

Description

Item

ANY

Variable to store returned item value

Outputs

Name

Type

Description

bSuccess

BOOL

Get_Generic

Gets the item at the front of the queue as a generic.

Outputs

Name

Type

Description

Item

T_Generic

Variable to store returned item value

bSuccess

BOOL

Reverse

Reverses the order of the items in the queue.

Outputs

Name

Type

Description

bSuccess

BOOL