示例#1
0
 protected override void CreateInstance()
 {
     _requestInclusionSupport = RequestInclusionSupport;
     //_requestInclusionSupport = new RequestDataOperation(RequestInclusionSupport.SrcNodeId, RequestInclusionSupport.DestNodeId,
     //    RequestInclusionSupport.Data, RequestInclusionSupport.TxOptions,
     //    new COMMAND_CLASS_INCLUSION_CONTROLLER.COMPLETE(), 2, 240000);
 }
示例#2
0
        protected override void CreateInstance()
        {
            sendData = new SendDataOperation(NodeId, Data, TxOptions);
            sendData.SubstituteSettings = SubstituteSettings;

            requestData = new RequestDataOperation(0, NodeId, Data, TxOptions, new[] { CmdClass, Cmd }, 2, TimeoutMs);
            requestData.SubstituteSettings = SubstituteSettings;
        }
示例#3
0
        protected override void CreateInstance()
        {
            _KexFailReceived         = new ResponseDataOperation(OnKexFailCallback, TransmitOptions.TransmitOptionNone, 0, COMMAND_CLASS_SECURITY_2.ID, COMMAND_CLASS_SECURITY_2.KEX_FAIL.ID);
            _SecurityMessageReceived = new ResponseDataOperation(OnSecurityMessageCallback, TransmitOptions.TransmitOptionNone, 0,
                                                                 COMMAND_CLASS_SECURITY_2.ID, COMMAND_CLASS_SECURITY_2.SECURITY_2_MESSAGE_ENCAPSULATION.ID);

            _KEXReportKEXSet = new RequestDataOperation(0, 0, null, _securityManagerInfo.TxOptions, new COMMAND_CLASS_SECURITY_2.KEX_SET(), 2, InclusionS2TimeoutConstants.Joining.KexSet);
            _KEXReportKEXSet.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
            _KEXReportKEXSet.Name             = "RequestData KEX_REPORT/KEX_SET";
            _KEXReportKEXSet.IgnoreRxStatuses = ReceiveStatuses.TypeMulti | ReceiveStatuses.TypeBroad;

            _PKReportPKReport = new RequestDataOperation(0, 0, null,
                                                         _securityManagerInfo.TxOptions, new COMMAND_CLASS_SECURITY_2.PUBLIC_KEY_REPORT(), 2, InclusionS2TimeoutConstants.Joining.PublicKeyReport);
            _PKReportPKReport.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
            _PKReportPKReport.Name             = "RequestData PUBLIC_KEY_REPORT/PUBLIC_KEY_REPORT";
            _PKReportPKReport.IgnoreRxStatuses = ReceiveStatuses.TypeMulti | ReceiveStatuses.TypeBroad;

            _KEXSetEchoKEXReportEcho = new RequestDataOperation(0, 0, null,
                                                                _securityManagerInfo.TxOptions, new COMMAND_CLASS_SECURITY_2.KEX_REPORT(), 2, InclusionS2TimeoutConstants.Joining.PublicKeyReport);
            _KEXSetEchoKEXReportEcho.Name = "RequestData KEX_SET(echo)/KEX_REPORT(echo)";
            _KEXSetEchoKEXReportEcho.SubstituteSettings.SetFlag(SubstituteFlags.UseSecurity);
            _KEXSetEchoKEXReportEcho.IgnoreRxStatuses = ReceiveStatuses.TypeMulti | ReceiveStatuses.TypeBroad;

            _NKGetNKReport = new RequestDataOperation(0, 0, null,
                                                      _securityManagerInfo.TxOptions, new COMMAND_CLASS_SECURITY_2.SECURITY_2_NETWORK_KEY_REPORT(), 2, InclusionS2TimeoutConstants.Joining.NetworkKeyReport);
            _NKGetNKReport.Name = "RequestData NETWORK_KEY_GET/NETWORK_KEY_REPORT";
            _NKGetNKReport.SubstituteSettings.SetFlag(SubstituteFlags.UseSecurity);
            _NKGetNKReport.IgnoreRxStatuses = ReceiveStatuses.TypeMulti | ReceiveStatuses.TypeBroad;

            _NKVerifyTransferEnd = new RequestDataOperation(0, 0, null,
                                                            _securityManagerInfo.TxOptions, new COMMAND_CLASS_SECURITY_2.SECURITY_2_TRANSFER_END(), 2, InclusionS2TimeoutConstants.Joining.TransferEnd);
            _NKVerifyTransferEnd.Name = "RequestData NETWORK_KEY_VERIFY/TRANSFER_END";
            _NKVerifyTransferEnd.SubstituteSettings.SetFlag(SubstituteFlags.UseSecurity);
            _NKVerifyTransferEnd.IgnoreRxStatuses = ReceiveStatuses.TypeMulti | ReceiveStatuses.TypeBroad;

            _TransferEnd = new SendDataExOperation(0, 0, new COMMAND_CLASS_SECURITY_2.SECURITY_2_TRANSFER_END(), _securityManagerInfo.TxOptions, SecuritySchemes.S2_TEMP);
            _TransferEnd.SubstituteSettings.SetFlag(SubstituteFlags.UseSecurity);
            _TransferEnd.Name = "SendData TRANSFER_END";

            _KexFail      = new SendDataExOperation(0, 0, null, _securityManagerInfo.TxOptions, SecuritySchemes.S2_TEMP);
            _KexFail.Name = "RequestData KEX_FAIL";
            _KexFail.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);

            _KexFailCancel      = new SendDataExOperation(0, 0, null, _securityManagerInfo.TxOptions, SecuritySchemes.NONE);
            _KexFailCancel.Name = "SendData KEX_FAIL_CANCEL";
            _KexFailCancel.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
            _KexFailCancel.Data = new COMMAND_CLASS_SECURITY_2.KEX_FAIL()
            {
                kexFailType = 0x06
            };
        }
示例#4
0
        protected override void CreateInstance()
        {
            requestNonce = new RequestDataOperation(SrcNodeId, DestNodeId,
                                                    new COMMAND_CLASS_SECURITY.SECURITY_NONCE_GET(), TxOptions,
                                                    new COMMAND_CLASS_SECURITY.SECURITY_NONCE_REPORT(), 2, NONCE_REQUEST_TIMER);
            if (_securityManagerInfo.IsInclusion)
            {
                requestNonce.Token.Reset(NONCE_REQUEST_INCLUSION_TIMER);
            }
            requestNonce.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);

            sendEncData = new SendDataBridgeOperation(SrcNodeId, DestNodeId, null, TxOptions);
            sendEncData.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
        }
示例#5
0
        protected override void CreateInstance()
        {
            _spanTable.UpdateTxSequenceNumber(_peerNodeId);
            _requestNonce = new RequestDataOperation(0,
                                                     NodeId,
                                                     new COMMAND_CLASS_SECURITY_2.SECURITY_2_NONCE_GET()
            {
                sequenceNumber = _spanTable.GetTxSequenceNumber(_peerNodeId)
            },
                                                     TxOptions,
                                                     new[]
            {
                new ByteIndex(COMMAND_CLASS_SECURITY_2.ID),
                new ByteIndex(COMMAND_CLASS_SECURITY_2.SECURITY_2_NONCE_REPORT.ID),
                ByteIndex.AnyValue,
                new ByteIndex(0x01, 0x01),
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue,
                ByteIndex.AnyValue
            },
                                                     NONCE_REQUEST_TIMER);
            if (_securityManagerInfo.IsInclusion)
            {
                _requestNonce.Token.Reset(NONCE_REQUEST_INCLUSION_TIMER);
            }
            _requestNonce.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
            _securityManagerInfo.InitializingNodeId = NodeId;

            _sendEncData = new SendDataOperation(TestNodeId ?? NodeId, null, TxOptions);
            _sendEncData.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
        }
示例#6
0
        protected override void CreateInstance()
        {
            requestNetworkKey = new RequestDataOperation(0, 0,
                                                         new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_REPORT()
            {
                supportedSecuritySchemes = _securityManagerInfo.SecuritySchemeInReportS0
            }, _securityManagerInfo.TxOptions,
                                                         new COMMAND_CLASS_SECURITY.NETWORK_KEY_SET(), 2, CMD_TIMEOUT);
            requestNetworkKey.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);

            requestSchemeInherit = new RequestDataOperation(0, 0,
                                                            new COMMAND_CLASS_SECURITY.NETWORK_KEY_VERIFY(), _securityManagerInfo.TxOptions,
                                                            new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_INHERIT(), 2, CMD_TIMEOUT);

            sendSecureSchemeReport = new SendDataExOperation(0, 0, new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_REPORT()
            {
                supportedSecuritySchemes = _securityManagerInfo.SecuritySchemeInReportEncryptedS0
            }, _securityManagerInfo.TxOptions, SecuritySchemes.S0);
            sendNetworkKeyVerify = new SendDataExOperation(0, 0, new COMMAND_CLASS_SECURITY.NETWORK_KEY_VERIFY(), _securityManagerInfo.TxOptions, SecuritySchemes.S0);
        }
示例#7
0
        protected override void CreateInstance()
        {
            requestScheme = new RequestDataOperation(0, 0,
                                                     new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_GET()
            {
                supportedSecuritySchemes = SecurityManagerInfo.SecuritySchemeInGetS0
            },
                                                     SecurityManagerInfo.TxOptions,
                                                     new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_REPORT(), 2, CMD_TIMEOUT);
            requestScheme.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);

            sendNetworkKeySet = new SendDataOperation(0, null, SecurityManagerInfo.TxOptions);

            expectNetworkKeyVerify = new ExpectDataOperation(0, 0, new COMMAND_CLASS_SECURITY.NETWORK_KEY_VERIFY(), 2, CMD_TIMEOUT);

            requestSchemeInherit = new RequestDataOperation(0, 0,
                                                            new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_INHERIT()
            {
                supportedSecuritySchemes = SecurityManagerInfo.SecuritySchemeInInheritS0
            },
                                                            SecurityManagerInfo.TxOptions,
                                                            new COMMAND_CLASS_SECURITY.SECURITY_SCHEME_REPORT(), 2, CMD_TIMEOUT);
        }
示例#8
0
        protected override void CreateInstance()
        {
            _spanTable.UpdateTxSequenceNumber(_peerNodeId);
            _requestNonce = new RequestDataOperation(SrcNodeId,
                                                     DestNodeId,
                                                     new COMMAND_CLASS_SECURITY_2.SECURITY_2_NONCE_GET()
            {
                sequenceNumber = _spanTable.GetTxSequenceNumber(_peerNodeId)
            },
                                                     TxOptions,
                                                     new COMMAND_CLASS_SECURITY_2.SECURITY_2_NONCE_REPORT(), 2,
                                                     NONCE_REQUEST_TIMER);
            if (_securityManagerInfo.IsInclusion)
            {
                _requestNonce.Token.Reset(NONCE_REQUEST_INCLUSION_TIMER);
            }
            _requestNonce.SubstituteSettings.SetFlag(SubstituteFlags.DenySecurity);
            _securityManagerInfo.InitializingNodeId = DestNodeId;

            _sendEncData = new SendDataBridgeOperation(SrcNodeId, TestNodeId ?? DestNodeId, null, TxOptions)
            {
                SubstituteSettings = new SubstituteSettings(SubstituteFlags.DenySecurity, 0)
            };
        }