← Back to Docs

DrvBrPvi Driver (Custom)

DrvBrPvi communicator driver documentation.

Custom Communicator DriversVersion6.0.0Updated2026-04-29OwnerScadaV6CommExt

DrvBrPvi Communicator Driver (Custom)

Functional Description

DrvBrPvi is a custom Communicator driver in ScadaV6CommExt for field device connectivity. Protocol details follow the source implementation.

Scope and Version

  • Source: ScadaV6CommExt/DrvBrPvi.Logic
  • TFM: net8.0
  • Version: 6.0.0

Install and Enable

  1. Deploy driver binaries to Communicator folders.
  2. Activate driver in Administrator → Communicator → Drivers.
  3. Upload configuration and restart Communicator.

Line and Device Configuration

  1. Create a communication line with the proper channel type.
  2. Add device and set address/timeouts.
  3. Set polling options and CmdLine as required by this driver; see Functional notes and configuration (template and source) below for file names, address format, and line keys.

CustomOptions (extracted)

KeyDefaultNote
UsernameExtracted from source; confirm meaning in driver implementation.
PasswordExtracted from source; confirm meaning in driver implementation.
PviDllPathExtracted from source; confirm meaning in driver implementation.
Timeout3000Extracted from source; confirm meaning in driver implementation.
ArsimfalseExtracted from source; confirm meaning in driver implementation.
RetryCount10Extracted from source; confirm meaning in driver implementation.

Code hints

16: protected DeviceTemplate deviceTemplate;
25: ConnectionRequired = false;
45: string fileName = PollingOptions.CmdLine.Trim();
46: deviceTemplate = new DeviceTemplate();
60: string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
61: string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
62: string pviDllPath = LineContext.LineConfig.CustomOptions.GetValueAsString("PviDllPath");
63: int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);
64: bool arsim = LineContext.LineConfig.CustomOptions.GetValueAsBool("Arsim", false);
65: retryCount = Math.Max(1, LineContext.LineConfig.CustomOptions.GetValueAsInt("RetryCount", 10));
211: string[] keys = { "Host", "Ip", "IP", "IPAddress", "TargetIP" };
214: string val = LineContext.LineConfig.CustomOptions.GetValueAsString(key)?.Trim() ?? string.Empty;

Administrator UI (Drv[内部驱动].View)

Configure in Administrator → Communicator. Labels below come from the View language pack.

  • View source: ScadaV6CommExt/Drv[内部驱动].View
  • Main forms:
    • FrmAuthSetting.cs
    • FrmDeviceProps.cs
    • FrmDeviceTemplate.cs
    • FrmTemplateSettings.cs
Phrase keyText
thisIEC104. Device Template Editor
btnAddCmd.ToolTipAdd command
gbDevTemplateDevice template
gbCmdCommand parameters
lblCmdAddressElement address
lblCmdNumCommand number
CmdsNodeCommands
DefCmdName
lblDevTemplateDevice template
TemplNotExistsThe device template file does not exist.
btnNew.ToolTipCreate new template
btnOpen.ToolTipOpen template
btnSave.ToolTipSave template
btnSaveAs.ToolTipSave template as
btnEditSettings.ToolTipEdit template settings
lblGrAddressStart element address
lblElemAddressAddress
lblCmdNameName
lblCmdTableTypeData table
cbCmdTableType.Items[0]归一化遥测值 (NVA)
cbCmdTableType.Items[1]标度化值(SVA)
cbCmdTableType.Items[2]短浮点数(Float)
chkCmdMultipleMultiple
lblCmdFuncCodeFunction code
lblCmdElemTypeElement type
lblCmdElemCntElement count
lblCmdByteOrderByte order
lblCmdByteOrderExampleFor example, 01234567
AddressHint{0}, starting from {1}
SaveTemplateConfirmTemplate has been modified. Save the changes?

Administrator UI

No matching Drv*.View project found for DrvBrPvi. Use the actual device/line property dialogs in Administrator.

Functional notes and configuration (template and source)

Derived from Logic/Common and device template XML: driver behavior and the Administrator/Communicator fields to set (address, CmdLine, line CustomOptions, template nodes).

Logic location

  • ScadaV6CommExt/DrvBrPvi.Logic
  • Common: DrvBrPvi.Common

Overrides

OnCommLineStart(), OnCommLineTerminate(), InitDeviceTags(), Session(), SendCommand()

CmdLine / template

  • PollingOptions.CmdLine.Trim();

DeviceConfig properties referenced

PropertyNote
未检测到 DeviceConfig.* 引用(可能使用基类封装)。

Line CustomOptions

KeyDefault
Username
Password
PviDllPath
Timeout3000
Arsimfalse
RetryCount10

XML keys (Common)

NodeNote
未在 Common 中解析到 GetChildAs*/AppendElem 节点(或无 Common 工程)。

Code excerpt

40: 
41:         public override void InitDeviceTags()
42:         {
43:             string fileName = PollingOptions.CmdLine.Trim();

42:         {
43:             string fileName = PollingOptions.CmdLine.Trim();
44:             deviceTemplate = new DeviceTemplate();
45: 

53:             driverCommonLib.InitCommandMaps(deviceTemplate);
54:             driverCommonLib.InitDeviceTags(DeviceTags, deviceTemplate);
55:             CanSendCommands = deviceTemplate.Cmds.Count > 0;
56: 

57:             string host = ResolveHost();
58:             string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
59:             string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
60:             string pviDllPath = LineContext.LineConfig.CustomOptions.GetValueAsString("PviDllPath");

58:             string username = LineContext.LineConfig.CustomOptions.GetValueAsString("Username");
59:             string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
60:             string pviDllPath = LineContext.LineConfig.CustomOptions.GetValueAsString("PviDllPath");
61:             int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);

59:             string password = LineContext.LineConfig.CustomOptions.GetValueAsString("Password");
60:             string pviDllPath = LineContext.LineConfig.CustomOptions.GetValueAsString("PviDllPath");
61:             int timeout = LineContext.LineConfig.CustomOptions.GetValueAsInt("Timeout", 3000);
62:             bool arsim = LineContext.LineConfig.CustomOptions.GetValueAsBool("Arsim", false);

Troubleshooting

  • No data: line, address, template, connectivity.
  • Template load errors: check logs.
  • Options ignored: verify option scope (line vs device).