Event Log Query Initiate

This MotoHawk™ block is part of the Logging Blockset and allows a query to be initiated. A query is the mechanism used to read content that has been logged to the referenced Event Log.

Block ID

Event Log Query Initiate

Library

motohawk_logging_lib

Description

Overview

This MotoHawk™ block is part of the Logging Blockset and allows a query to be initiated. A query is the mechanism used to read content that has been logged to the referenced Event Log.

Query Types

A query can be initiated to start at the newest entry and work backward (via Query Next), or start at the oldest entry and work forward (via the same Query Next). The Query input port defines the type of query:

Input Ports

Query (uint8)

Specifies the requested query

Idx (uint32)

The index port is a zero based index that can be used to initiate a query part way through the referenced Event Log. For instance, supplying a value of 2 would initiate a query that would return the 3rd newest (assuming the initiated Query was to start from the newest event). An Event Log Query Result will return a status of 'Log - Event Not Found Range'.

EventID (uint8)

The EventID input is an optional port that is used when a query is requested that is to look for a specific event

Output Ports

Status (uint8)

A status of [0](Log - Busy) indicates that the query is still underway. Try again later.

A staus of [1](Log - OK) indicates that the query was scheduled to occur.

A status of two or more indicates that the query was not scheduled because of an error. The value indicates the type of error.

Common errors are [6]](Log - Q Overflow), which results when the Event Log is unable to support further parallel queries (an existing query first needs to be freed in order to free up a query slot) or [10]](Log - Bad Handle), which results when this block instance has been executed before to initiate a query without then successfully freeing that query.

Block Parameters

Parameter Field Values Comments/Description
Reference Event Log Name Single quote enclosed c-legal alpha-numeric text The name of the Event Log definition block that is to be queried.
Query Name Single quote enclosed c-legal alpha-numeric text The name to be assigned to the query.

Other query operations like Event Log Query Next, Event Log Query Result, and Event Log Query End reference this name.