ITK Function Reference

(V10000.1.0.60_20160308.00)
Functions
PS Signal

Functions

MECHATRONICS_API int SIG_ask_associated_system_role (tag_t signal_line_tag, tag_t associated_sysline_tag, char **role)
 
MECHATRONICS_API int SIG_ask_associated_systems (tag_t signal_line_tag, int *associated_systems_count, tag_t **associated_systems_tags)
 
MECHATRONICS_API int SIG_ask_device_received_signals (const tag_t linetag, int *receivedcount, tag_t **receivedtags)
 
MECHATRONICS_API int SIG_ask_device_sources (const tag_t linetag, int *sourcecount, tag_t **sourcetags)
 
MECHATRONICS_API int SIG_ask_device_targets (const tag_t linetag, int *targetcount, tag_t **targettags)
 
MECHATRONICS_API int SIG_ask_device_transmitted_signals (const tag_t linetag, int *txmittedcount, tag_t **txmittedtags)
 
MECHATRONICS_API int SIG_ask_is_message (tag_t lineTag, logical *verdict)
 
MECHATRONICS_API int SIG_ask_pvariable_line_value (tag_t pvar_line_tag, double *pvar_line_value)
 
MECHATRONICS_API int SIG_ask_redundant_signals (tag_t primary_signal_line_tag, int *redundant_signal_count, tag_t **redundant_signal_line_tags)
 
MECHATRONICS_API int SIG_ask_signal_line_value (tag_t signal_line_tag, double *signal_value)
 
MECHATRONICS_API int SIG_ask_signal_pvariable (tag_t signal_line_tag, tag_t *pvar_line_tagptr)
 
MECHATRONICS_API int SIG_ask_signal_pvariables (tag_t signalLineTag, int *pvariableCount, tag_t **pvariableLineTags)
 
MECHATRONICS_API int SIG_ask_signal_sources (const tag_t linetag, int *sourcecount, tag_t **sourcetags)
 
MECHATRONICS_API int SIG_ask_signal_targets (const tag_t linetag, int *targetcount, tag_t **targettags)
 
MECHATRONICS_API int SIG_ask_signal_transmitters (const tag_t linetag, int *txmittercount, tag_t **txmittertags)
 
MECHATRONICS_API int SIG_ask_signal_units (tag_t signal_tag, tag_t *uom_tagptr)
 
MECHATRONICS_API int SIG_ask_signals_of_pvariable (tag_t pvariableLineTag, int *signalCount, tag_t **signalLineTags)
 
MECHATRONICS_API int SIG_create_signal (const char *signal_id, const char *signal_name, const char *signal_type, const char *signal_rev_id, tag_t *new_signal, tag_t *new_signal_rev)
 
MECHATRONICS_API int SIG_set_associated_system (tag_t signal_line_tag, tag_t system_line_tag, const char *role, tag_t *relation_tagptr)
 
MECHATRONICS_API int SIG_set_associated_systems (tag_t primary, int num_secondaries, tag_t *secondaries, char *role, logical *has_failures, int *num_failed_lines, tag_t **failed_lines)
 
MECHATRONICS_API int SIG_set_pvariable_line_value (tag_t pvar_line_tag, double pvar_line_value)
 
MECHATRONICS_API int SIG_set_redundant_signal (tag_t primary_signal_line_tag, tag_t redundant_signal_line_tag, tag_t *relation_tagptr)
 
MECHATRONICS_API int SIG_set_signal_line_value (tag_t signal_line_tag, double signal_value)
 
MECHATRONICS_API int SIG_set_signal_pvariable (tag_t signal_line_tag, tag_t pvar_line_tag)
 
MECHATRONICS_API int SIG_set_signal_units (tag_t signal_tag, tag_t uom_tag)
 
MECHATRONICS_API int SIG_unset_associated_system (tag_t signal_line_tag, tag_t system_line_tag)
 
MECHATRONICS_API int SIG_unset_associated_systems (tag_t primary, int num_secondaries, tag_t *secondaries, char *role, logical *has_failures, int *num_failed_lines, tag_t **failed_lines)
 
MECHATRONICS_API int SIG_unset_redundant_signal (tag_t primary_signal_line_tag, tag_t redundant_signal_line_tag)
 
MECHATRONICS_API int SIG_unset_signal_pvariable (tag_t signal_line_tag)
 
MECHATRONICS_API int SIGREV_ask_signal_characteristics (tag_t signal_rev_tag, char **signal_characteristics)
 
MECHATRONICS_API int SIGREV_ask_signal_value (tag_t signal_rev_tag, double *signal_value)
 
MECHATRONICS_API int SIGREV_set_signal_characteristics (tag_t signal_rev_tag, const char *signal_characteristics)
 
MECHATRONICS_API int SIGREV_set_signal_value (tag_t signal_rev_tag, double signal_value)
 

PS Signal definitions

#define PSSIGNAL_CLASS_NAME   "PSSignal"
 
#define PSSIGNAL_TYPE_NAME   PSSIGNAL_CLASS_NAME
 
#define PSSignalClassName   PSSIGNAL_CLASS_NAME
 
#define PSSIGNAL_REV_CLASS_NAME   "PSSignalRevision"
 
#define PSSIGNAL_REV_TYPE_NAME   PSSIGNAL_REV_CLASS_NAME
 
#define PSSignalRevClassName   PSSIGNAL_REV_CLASS_NAME
 

Type for OOTB Message type defined - parent is PSSignal

#define MESSAGE   "Message"
 
#define MESSAGE_REV   "Message Revision"
 

Type for OOTB signal

#define SIGNAL_TYPE_NAME   "Signal"
 
#define SIGNAL_REV_TYPE_NAME   "SignalRevision"
 

Detailed Description

Macro Definition Documentation

#define MESSAGE   "Message"

Definition at line 43 of file pssignal.h.

#define MESSAGE_REV   "Message Revision"

Definition at line 44 of file pssignal.h.

#define PSSIGNAL_CLASS_NAME   "PSSignal"

Definition at line 30 of file pssignal.h.

#define PSSIGNAL_REV_CLASS_NAME   "PSSignalRevision"

Definition at line 34 of file pssignal.h.

#define PSSIGNAL_REV_TYPE_NAME   PSSIGNAL_REV_CLASS_NAME

Definition at line 35 of file pssignal.h.

#define PSSIGNAL_TYPE_NAME   PSSIGNAL_CLASS_NAME

Definition at line 31 of file pssignal.h.

#define PSSignalClassName   PSSIGNAL_CLASS_NAME

Definition at line 32 of file pssignal.h.

#define PSSignalRevClassName   PSSIGNAL_REV_CLASS_NAME

Definition at line 36 of file pssignal.h.

#define SIGNAL_REV_TYPE_NAME   "SignalRevision"

Definition at line 52 of file pssignal.h.

#define SIGNAL_TYPE_NAME   "Signal"

Definition at line 51 of file pssignal.h.

Function Documentation

MECHATRONICS_API int SIG_ask_associated_system_role ( tag_t  signal_line_tag,
tag_t  associated_sysline_tag,
char **  role 
)

This function returns the role of association between a Process variable (GDE) line and another BOM line (Item or GDE line)

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_line_tag(I) Tag of signal or process variable line
associated_sysline_tag(I) Tag of bom Line associated with signal using associated system relation
role(OF) Name of the role which defines the purpose of association between signal and other BOM line. Must be freed with MEM_free after usage.
MECHATRONICS_API int SIG_ask_associated_systems ( tag_t  signal_line_tag,
int *  associated_systems_count,
tag_t **  associated_systems_tags 
)

This function will find all the systems (Port, Terminal, Connection, Device etc) that are associated with signal instance using "associcated_system" relations.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_line_tag(I) Signal or process variable line tag whose associated systems you are trying to find
associated_systems_count(O) Count of systems associated with signal instance
associated_systems_tags(OF) associated_systems_count List of associated system tags
MECHATRONICS_API int SIG_ask_device_received_signals ( const tag_t  linetag,
int *  receivedcount,
tag_t **  receivedtags 
)
Parameters
linetag(I)
receivedcount(O)
receivedtags(OF) receivedcount
MECHATRONICS_API int SIG_ask_device_sources ( const tag_t  linetag,
int *  sourcecount,
tag_t **  sourcetags 
)
Parameters
linetag(I)
sourcecount(O)
sourcetags(OF) sourcecount
MECHATRONICS_API int SIG_ask_device_targets ( const tag_t  linetag,
int *  targetcount,
tag_t **  targettags 
)
Parameters
linetag(I)
targetcount(O)
targettags(OF) targetcount
MECHATRONICS_API int SIG_ask_device_transmitted_signals ( const tag_t  linetag,
int *  txmittedcount,
tag_t **  txmittedtags 
)
Parameters
linetag(I)
txmittedcount(O)
txmittedtags(OF) txmittedcount
MECHATRONICS_API int SIG_ask_is_message ( tag_t  lineTag,
logical verdict 
)
Parameters
lineTag(I)
verdict(O)
MECHATRONICS_API int SIG_ask_pvariable_line_value ( tag_t  pvar_line_tag,
double *  pvar_line_value 
)

This function asks the "pvar value" on a process variable line.

Parameters
pvar_line_tag(I)
pvar_line_value(O)
MECHATRONICS_API int SIG_ask_redundant_signals ( tag_t  primary_signal_line_tag,
int *  redundant_signal_count,
tag_t **  redundant_signal_line_tags 
)

This function returns the redundant signal if any for the given signal line. If there is no redundant, the function returns NULLTAG.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
primary_signal_line_tag(I) Tag of signal line, whose redundant to be returned
redundant_signal_count(O) Count of redundant signals for the given primary signal
redundant_signal_line_tags(OF) redundant_signal_count Tag list of redundant signal lines
MECHATRONICS_API int SIG_ask_signal_line_value ( tag_t  signal_line_tag,
double *  signal_value 
)

This function returns the "signal value" associated with signal line.

Parameters
signal_line_tag(I)
signal_value(O)
MECHATRONICS_API int SIG_ask_signal_pvariable ( tag_t  signal_line_tag,
tag_t pvar_line_tagptr 
)

This function will find the process_variable associated with the signal instance in the context of a product structure.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_line_tag(I) Signal line tag whose associated systems you are trying to find
pvar_line_tagptr(O) Instance of process variable associated with signal instance
MECHATRONICS_API int SIG_ask_signal_pvariables ( tag_t  signalLineTag,
int *  pvariableCount,
tag_t **  pvariableLineTags 
)

This function returns the proccess variable if any for the given signal line. If there is no proccess variable, the function returns NULLTAG.

Parameters
signalLineTag(I) Tag of signal line, whose pvariable to be returned
pvariableCount(O) Count of pvariables for the given primary signal
pvariableLineTags(OF) pvariableCount Tag list of pvariable lines
MECHATRONICS_API int SIG_ask_signal_sources ( const tag_t  linetag,
int *  sourcecount,
tag_t **  sourcetags 
)
Parameters
linetag(I)
sourcecount(O)
sourcetags(OF) sourcecount
MECHATRONICS_API int SIG_ask_signal_targets ( const tag_t  linetag,
int *  targetcount,
tag_t **  targettags 
)
Parameters
linetag(I)
targetcount(O)
targettags(OF) targetcount
MECHATRONICS_API int SIG_ask_signal_transmitters ( const tag_t  linetag,
int *  txmittercount,
tag_t **  txmittertags 
)
Parameters
linetag(I)
txmittercount(O)
txmittertags(OF) txmittercount
MECHATRONICS_API int SIG_ask_signal_units ( tag_t  signal_tag,
tag_t uom_tagptr 
)

This function returns units set on a given signal object.

Note
Alternately, you may use, ITEM_ask_unit_of_measure to get signal units.
Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_tag(I) Signal revision object tag
uom_tagptr(O) Pointer to Tag object for returning signal units (uom) of the given signal object. If units is not set, this function returns NULLTAG.
MECHATRONICS_API int SIG_ask_signals_of_pvariable ( tag_t  pvariableLineTag,
int *  signalCount,
tag_t **  signalLineTags 
)

This function returns the primary signals if any for the given secondary pvariable line. If there is no signal, the function returns NULLTAG.

Parameters
pvariableLineTag(I) Tag of pvariable line, whose signals to be returned
signalCount(O) Count of signals for the given primary pvariable
signalLineTags(OF) signalCount Tag list of signal lines
MECHATRONICS_API int SIG_create_signal ( const char *  signal_id,
const char *  signal_name,
const char *  signal_type,
const char *  signal_rev_id,
tag_t new_signal,
tag_t new_signal_rev 
)

This function will create a new, standalone signal object given an ID and name.

Restrictions:

  1. For a signal_type other than null, the type must be defined by the site using "install_types" utility. If value is specified as null, the default type "PSSignal" will be used.
  2. The signal_name will be used as the revision�s name.
Note
This itk will not save the object. AOM_save_with_extensions needs to be called separately to save the object.
Parameters
signal_id(I) Unique identifier for the signal. If null, the system will automatically generate ID.
signal_name(I) Signal name
signal_type(I) Type of the signal to be created. Null is allowed for this argument.
signal_rev_id(I) Identifier for the default signal revision. A null is allowed for this argument. If null, the system will automatically generate revision id.
new_signal(O) Tag of new signal object
new_signal_rev(O) Tag of new signal revision object
MECHATRONICS_API int SIG_set_associated_system ( tag_t  signal_line_tag,
tag_t  system_line_tag,
const char *  role,
tag_t relation_tagptr 
)

Creates association between a signal line and an Item line for a given role.
Role input must be passed for transmitter association.
For source or target role, this input is optional and may or may not be passed.
If input role is empty, the direction attribute value on the secondary GDE will be used for association creation between the primary and secondary.

Restrictions:

  1. Only one association is permitted between signal and associated system for the role "source".
  2. Only one "role" is permitted between a signal instance and the associated system line.
Returns
Parameters
signal_line_tag(I) Tag of signal or process variable (GDE) line
system_line_tag(I) Tag of BOM Line to be associated with Signal
role(I) Callers must pass a valid non-null role in the char* role string argument for transmitter association. For source or target role, this input is optional and may or may not be passed. If input role is empty, the direction attribute value on the secondary GDE will be used for association creation.
relation_tagptr(O) Tag of the relation. The function returns NULLTAG if unable to create relation.
MECHATRONICS_API int SIG_set_associated_systems ( tag_t  primary,
int  num_secondaries,
tag_t secondaries,
char *  role,
logical has_failures,
int *  num_failed_lines,
tag_t **  failed_lines 
)

Creates associations between a signal line and valid bomlines.
This method will handle multiple secondary lines and will be used to create associated system relations of role "source", "target", "transmitter".
This call can be used to set source, target or transmitters for signals.

Note
In order to associate a signal to a process variable or
redundant signal, the ITKs SIG_set_signal_pvariable and
SIG_set_redundant_signal must be used
Returns
Parameters
primary(I) Signal line for which association will be created
num_secondaries(I) Number of secondary BOM Lines
secondaries(I) Tags of secondary BOM Lines.
role(I) Callers must pass a valid non-null role in the char* role string argument for transmitter association. For source or target role, this input is optional and may or may not be passed. If input role is empty, the direction attribute value on the secondary GDE will be used for association creation.
has_failures(O) Flag to indicate failures
num_failed_lines(O) Number of failed BOM Lines
failed_lines(OF) num_failed_lines Failed BOM Lines tag
MECHATRONICS_API int SIG_set_pvariable_line_value ( tag_t  pvar_line_tag,
double  pvar_line_value 
)

This function sets the "pvar value" on a process variable line.

Parameters
pvar_line_tag(I)
pvar_line_value(I)
MECHATRONICS_API int SIG_set_redundant_signal ( tag_t  primary_signal_line_tag,
tag_t  redundant_signal_line_tag,
tag_t relation_tagptr 
)

This function associates "redundant_signal_line" as a redundant for the given signal

Restrictions:

There can be only one redundant for a given signal. The function returns error if the primary signal already contains a redundant.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
primary_signal_line_tag(I) Tag of primary signal line
redundant_signal_line_tag(I) Tag of signal Line to be associated with primary as a redundant
relation_tagptr(O) Tag of the redundant relation
MECHATRONICS_API int SIG_set_signal_line_value ( tag_t  signal_line_tag,
double  signal_value 
)

This function sets the "signal value" on a signal line.

Parameters
signal_line_tag(I)
signal_value(I)
MECHATRONICS_API int SIG_set_signal_pvariable ( tag_t  signal_line_tag,
tag_t  pvar_line_tag 
)

This function will associate a process_variable to the given signal instance in the context of a product structure.

Restrictions:

Only one process variable can be associated for a given signal instance.

Return values
ifail1Does not belong to the same structure
ifail2Process variable at a higher level than Signal
ifail3Signal is already associated with a process variable. Signal cannot be associated with more than one Process variable.
Parameters
signal_line_tag(I) BomLine tag of a signal occurrence
pvar_line_tag(I) BomLine tag of a process variable
MECHATRONICS_API int SIG_set_signal_units ( tag_t  signal_tag,
tag_t  uom_tag 
)

This function sets units on a given signal object.

Note
Alternately, you may use, ITEM_set_unit_of_measure to set signal units.
Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_tag(I) Signal object tag
uom_tag(I) Tag of UOM object to be set as units of the given signal
MECHATRONICS_API int SIG_unset_associated_system ( tag_t  signal_line_tag,
tag_t  system_line_tag 
)

This function will disassociate a signal instance from another Item line, which was connected through "associated_system" relation in the context of a product structure. This ITK will remove ALL the associations between the signal_line_tag and the system_line_tag corresponding to valid associated system roles between the two lines

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_line_tag(I) BomLine tag of a signal or process variable
system_line_tag(I) Any Item line in the product/function structure at the same or lower level than Signal line
MECHATRONICS_API int SIG_unset_associated_systems ( tag_t  primary,
int  num_secondaries,
tag_t secondaries,
char *  role,
logical has_failures,
int *  num_failed_lines,
tag_t **  failed_lines 
)

Removes associations between primary and secondary bomlines for the specific role.

Returns
Parameters
primary(I) Signal line whose association will be removed
num_secondaries(I) Number of secondary BOM Lines
secondaries(I) Tags of secondary BOM Lines. If one of the secondaries is invalid they will be added to the failedLines. If an association does not exist between the primary and one or more of the secondaries, the secondary will be added to the failedLines array and the function will process the next secondary.
role(I) Callers must pass a valid non-null role in the char* role string argument for transmitter association. For source or target role, this input is optional and may or may not be passed. If input role is empty, the source and target association between the primary and secondary will be removed. This ITK will then remove the associations between the primary and secondaries, if they exist for that specific role.
has_failures(O) Flag to indicate failures
num_failed_lines(O) Number of failed BOM Lines.
failed_lines(OF) num_failed_lines Failed BOM Lines tag
MECHATRONICS_API int SIG_unset_redundant_signal ( tag_t  primary_signal_line_tag,
tag_t  redundant_signal_line_tag 
)

This function removes the association between the given signal line and another signal line, which is a redundant.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
primary_signal_line_tag(I) Tag of signal line, whose redundant to be removed
redundant_signal_line_tag(I) Tag of redundant signal line
MECHATRONICS_API int SIG_unset_signal_pvariable ( tag_t  signal_line_tag)

This function will disassociate a process_variable, if exists, from the given signal instance in the context of a product structure.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_line_tag(I) BomLine tag of a signal occurrence
MECHATRONICS_API int SIGREV_ask_signal_characteristics ( tag_t  signal_rev_tag,
char **  signal_characteristics 
)

This function returns the characteristics of given signal revision.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_rev_tag(I) Signal revision object tag
signal_characteristics(OF) Pointer to char* for returning signal characteristics of the given signal revision. The memory must be freed using MEM_free.
MECHATRONICS_API int SIGREV_ask_signal_value ( tag_t  signal_rev_tag,
double *  signal_value 
)

This function returns the value of the given signal revision.

Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_rev_tag(I) Signal revision object tag
signal_value(O) Pointer to double data for returning signal value from the revision
MECHATRONICS_API int SIGREV_set_signal_characteristics ( tag_t  signal_rev_tag,
const char *  signal_characteristics 
)

This function sets the given characteristics on the given signal revision.

Note
User need to call AOM_save() on Signal revision after this function call to commit the changes.
Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_rev_tag(I) Signal revision object tag
signal_characteristics(I) Characteristics of the signal to be assigned to the given signal revision
MECHATRONICS_API int SIGREV_set_signal_value ( tag_t  signal_rev_tag,
double  signal_value 
)

This function sets the given value on given signal revision.

Note
User needs to call AOM_save() on Signal revision after this function call to commit the changes.
Return values
ifail1No process variable is associated with Signal
ifail2Cannot disassociate Process variable
Parameters
signal_rev_tag(I) Signal revision object tag
signal_value(I) Value to be assigned to the signal revision