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

PatternMask

Error

Input

funcCode

FunctionCode

function code, DNPDEFS_FC_SELECT, DNPDEFS_FC_OPERATE,

DNPDEFS_FC_DIRECT_OP, or DNPDEFS_FC_DIRECT_OP_NOACK

autoMode

USINT

bit mask to specify which actions to perform. Combine AUTO_MODE_OPERATE and AUTO_MODE_FEEDBACK as needed.

opFeedbackDelay

TIME

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

AddressQualifier

address qualifier, must be 8 or 16 bit start/stop

QUAL_8BIT_START_STOP or QUAL_16BIT_START_STOP

start

UINT

first point number for mask

stop

UINT

last point number for mask

control

USINT

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

count

USINT

number of times outstation shall execute the operation

activationPeriod

TIME

pulse activation time

deactivationPeriod

TIME

pulse deactivation time

pMask

POINTER 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