FB_Deque (Function Block)

(Pronounced Deck) Double ended queue. A collection that supports the insertion and removal of items at the front and back.

Implements: I_Deque

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 Deque.

Methods

Back

Get item at the back of the deque without removing it.

Inputs

Name

Type

Description

Item

ANY

Variable to store returned item value

Outputs

Name

Type

Description

bSuccess

BOOL

Clear

Empties/Clears/Deletes every item in the deque.

Dequeue_At_Back

Removes item at the front of the deque.

Outputs

Name

Type

Description

bSuccess

BOOL

Dequeue_At_Front

Removes item at the front of the deque.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue_At_Back

Adds item at the back of the deque.

Inputs

Name

Type

Description

Item

ANY

Item to store.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue_At_Front

Add item to the front of the deque.

Inputs

Name

Type

Description

Item

ANY

Item to store.

Outputs

Name

Type

Description

bSuccess

BOOL

Enqueue_Generic

Adds a generic item at the back of the deque.

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

Front

Get item at the front of the deque without removing it.

Inputs

Name

Type

Description

Item

ANY

Variable to store returned item value

Outputs

Name

Type

Description

bSuccess

BOOL

Reverse

Reverses the order of items in the deque.

Outputs

Name

Type

Description

bSuccess

BOOL