Master.PatternMask (METH)ΒΆ
METHOD PatternMask : Error
Send a pattern mask to remote device
NOTE: If you are doing a SELECT/OPERATE but choose not to use the autoMode mask to do this, but instead are going to call this brm function to send the SELECT and then call this function again to send the OPERATE, you will need to increase the pReqDesc->priority of the OPERATE to 255 to guarantee it gets sent before any automatic processing of events is performed. (Automatic processing of events is enabled by default when the mdnp session was opened). For example, if in the response to the SELECT the restart IIN bit is set and the session was set up to automatically send a clear restart command, you will want to make sure the OPERATE gets sent before the clear restart, otherwise the operate will fail.
- InOut:
Scope
Name
Type
Comment
Return
PatternMaskInput
funcCode- function code, DNPDEFS_FC_SELECT, DNPDEFS_FC_OPERATE,
DNPDEFS_FC_DIRECT_OP, or DNPDEFS_FC_DIRECT_OP_NOACK
autoModeUSINTbit mask to specify which actions to perform. Combine AUTO_MODE_OPERATE and AUTO_MODE_FEEDBACK as needed.
opFeedbackDelayTIME- specify a delay, in milliseconds, after receiving
the response to an operate or direct operate request before issueing an operate feedback poll using the autoMode parameter.
qualifier- address qualifier, must be 8 or 16 bit start/stop
QUAL_8BIT_START_STOP or QUAL_16BIT_START_STOP
startUINTfirst point number for mask
stopUINTlast point number for mask
controlUSINT- control code
- low 4 bits is Op Type
DNPDEFS_CROB_CTRL_NUL, DNPDEFS_CROB_CTRL_PULSE_ON, DNPDEFS_CROB_CTRL_PULSE_OFF, DNPDEFS_CROB_CTRL_LATCH_ON, or DNPDEFS_CROB_CTRL_LATCH_OFF
Then the Queue Field which is obsolete Then the Clear Field DNPDEFS_CROB_CTRL_CLEAR Then the two bit Trip-Close field 0, or DNPDEFS_CROB_CTRL_PAIRED_CLOSE or DNPDEFS_CROB_CTRL_PAIRED_TRIP
countUSINTnumber of times outstation shall execute the operation
activationPeriodTIMEpulse activation time
deactivationPeriodTIMEpulse deactivation time
pMaskPOINTER TO USINT
- bitmask indicating which points in the range specified by start->stop are to be controlled.
bit value of 1 means that point should be controlled. Example: funcCode=DNPDEFS_FC_DIRECT_OP, start==2, stop==17,
control=DNPDEFS_CROB_CTRL_LATCH_ON, *pMask=0x81,0x10;
sends a latch on to points 2, 9 and 14