op_ev_id_str_get()

Abstract

Obtains the string representation of an event ID.

Syntax

op_ev_id_str_get (evhandle, buffer)
Argument Type Description
evhandle Evhandle ID of the event-of-interest
buffer char * variable to be filled with the string representation of the event ID

Return Type

Compcode

OPC_COMPCODE_SUCCESS if the event ID string is successfully obtained; OPC_COMPCODE_FAILURE otherwise.

Example

char     ev_id_str[20];

/* Get the currently executing event */
evptr = op_ev_current ();

/* Get the event ID as a string */
op_ev_id_str_get (evptr, ev_id_str);

Details

If the simulation uses module-based ID generation, the returned string consists of the ID of the module in which the event was created (or “kernel” if created by the simulation) and the creation index in that module. Otherwise, it is simply the global event creation index.

When using module-based ID generation, this KP provides a better output than just using OPC_EV_ID_FMT to print the ID to a string.

Purpose

Provides a way to obtain a well-formed string representation of an event ID, regardless of whether ID generation is module-based or global.

Errors

  • Recoverable Error: Event handle refers to an event that is either invalid or not currently scheduled.

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com