Subject: Signals{}

From: SRD Tian YaMin <[email-masked]>
Date: Wed, 27 Dec 2000 16:07:51 +0800

Hi, now I'm using bianry encoding to encode Signals{} in a ModifyRequest.
But I don't know how, now I have 4 ways, but I don't know which one is
correct or none is correct.
1.
                        ASN1T_SignalName SignalName;
                        SignalName.numocts = 4;
                        SignalName.data[0] = 0;                 // set
signalname to be 0
                        SignalName.data[1] = 0;
                        SignalName.data[2] = 0;
                        SignalName.data[3] = 0;

                        ASN1T_Signal    Signal;
                        memset(&Signal, 0, sizeof(Signal));
                        Signal.signalName = SignalName;

                        ASN1T_SignalRequest             SignalRequest[1];
                        SignalRequest[0].t = 1;
                        SignalRequest[0].u.signal = &Signal;

                        ASN1T_SignalsDescriptor SignalsDescriptor;
                        SignalsDescriptor.n = 1;
                        SignalsDescriptor.elem = SignalRequest;

                        ASN1T_AmmRequest ModifyRequest;
                        memset(&ModifyRequest, 0, sizeof(ModifyRequest));
                        ModifyRequest.m.signalsDescriptorPresent = 1;
                        ModifyRequest.signalsDescriptor = SignalsDescriptor;
                        ......

2.
                        ASN1T_Signal    Signal;
                        memset(&Signal, 0, sizeof(Signal));

                        ASN1T_SignalRequest             SignalRequest[1];
                        SignalRequest[0].t = 1;
                        SignalRequest[0].u.signal = &Signal;

                        ASN1T_SignalsDescriptor SignalsDescriptor;
                        SignalsDescriptor.n = 1;
                        SignalsDescriptor.elem = SignalRequest;

                        ASN1T_AmmRequest ModifyRequest;
                        memset(&ModifyRequest, 0, sizeof(ModifyRequest));
                        ModifyRequest.m.signalsDescriptorPresent = 1;
                        ModifyRequest.signalsDescriptor = SignalsDescriptor;
                        ......

3.
                        ASN1T_SignalRequest             SignalRequest[1];
                        SignalRequest[0].t = 1;
                        SignalRequest[0].u.signal = NULL;

                        ASN1T_SignalsDescriptor SignalsDescriptor;
                        SignalsDescriptor.n = 1;
                        SignalsDescriptor.elem = SignalRequest;

                        ASN1T_AmmRequest ModifyRequest;
                        memset(&ModifyRequest, 0, sizeof(ModifyRequest));
                        ModifyRequest.m.signalsDescriptorPresent = 1;
                        ModifyRequest.signalsDescriptor = SignalsDescriptor;
                        ......

4.
                        ASN1T_SignalsDescriptor SignalsDescriptor;
                        memset(&SignalsDescriptor, 0,
sizeof(SignalsDescriptor));

                        ASN1T_AmmRequest ModifyRequest;
                        memset(&ModifyRequest, 0, sizeof(ModifyRequest));
                        ModifyRequest.m.signalsDescriptorPresent = 1;
                        ModifyRequest.signalsDescriptor = SignalsDescriptor;

Thanks

Tian Yamin