Exemple #1
0
        public unsafe IProgramNo DeleteBankSetting(IProgramNo programNo)
        {
            WorkSpace workSpace = TcpCommand.GetWorkSpace(typeof(RequestForGetBankSetting));
            RequestForGetBankSetting *address = (RequestForGetBankSetting *)(void *)workSpace.Address;

            address->header.wCommHeaderId       = (ushort)4427;
            address->header.byCommandKind       = (byte)59;
            address->header.lBodyLength         = 0;
            address->header.uOption0.abyCode[0] = (byte)programNo.No;
            this.SendRequest(workSpace);
            TcpCommand.ReleaseWorkSpace(workSpace);
            WorkSpace fixedLengthReply = this.ReceiveFixedLengthReply(typeof(ReplyForSwitchBank));
            ProgramNo programNo1       = new ProgramNo((ReplyForSwitchBank *)(void *)fixedLengthReply.Address);

            TcpCommand.ReleaseReceiveBuffer(fixedLengthReply);
            return((IProgramNo)programNo1);
        }
Exemple #2
0
        public unsafe IProgramNo SetBankSetting(
            ref BankSettingAll bankSettingAll,
            IProgramNo programNo)
        {
            WorkSpace workSpace = TcpCommand.GetWorkSpace(typeof(RequestForSetBankSetting));
            RequestForSetBankSetting *address = (RequestForSetBankSetting *)(void *)workSpace.Address;

            address->header.wCommHeaderId       = (ushort)4427;
            address->header.byCommandKind       = (byte)20;
            address->header.lBodyLength         = Marshal.SizeOf(typeof(BankSettingAll)) + Marshal.SizeOf(typeof(StructSize));
            address->header.uOption0.abyCode[0] = (byte)programNo.No;
            address->size.wKind       = (ushort)10;
            address->size.wElementNum = (ushort)1;
            address->size.lLength     = Marshal.SizeOf(typeof(BankSettingAll));
            address->body             = bankSettingAll;
            this.SendRequest(workSpace);
            TcpCommand.ReleaseWorkSpace(workSpace);
            WorkSpace fixedLengthReply = this.ReceiveFixedLengthReply(typeof(ReplyForSetBankSetting));
            ProgramNo programNo1       = new ProgramNo((ReplyForSwitchBank *)(void *)fixedLengthReply.Address);

            TcpCommand.ReleaseReceiveBuffer(fixedLengthReply);
            return((IProgramNo)programNo1);
        }
Exemple #3
0
 private void SendSwitchProgramCommand(ProgramNo programNo)
 {
     this._command.SwitchBank((IProgramNo)programNo);
 }
Exemple #4
0
 private void SetBankSettingCommand(ref BankSettingAll bankSettingAll, ProgramNo programNo)
 {
     this._command.SetBankSetting(ref bankSettingAll, (IProgramNo)programNo);
 }