Ejemplo n.º 1
0
 public InstanceHandle RegisterInstance(
     FDMDATA instanceData)
 {
     return(DDS.OpenSplice.FooDataWriter.RegisterInstance(
                this,
                instanceData));
 }
Ejemplo n.º 2
0
        public override bool CopyIn(System.IntPtr basePtr, object untypedFrom, System.IntPtr to, int offset)
        {
            FDMDATA from = untypedFrom as FDMDATA;

            if (from == null)
            {
                return(false);
            }
            Write(to, offset + offset_ID, from.ID);
            Write(to, offset + offset_Throttle, from.Throttle);
            Write(to, offset + offset_ElevatorCommand, from.ElevatorCommand);
            Write(to, offset + offset_AileronCommand, from.AileronCommand);
            Write(to, offset + offset_RudderCommand, from.RudderCommand);
            Write(to, offset + offset_SteerLeft, from.SteerLeft);
            Write(to, offset + offset_SteerRight, from.SteerRight);
            Write(to, offset + offset_LeftBrakeCommand, from.LeftBrakeCommand);
            Write(to, offset + offset_RightBrakeCommand, from.RightBrakeCommand);
            Write(to, offset + offset_FlapCommand, from.FlapCommand);
            Write(to, offset + offset_EngineStartSwitch, from.EngineStartSwitch);
            Write(to, offset + offset_ThrottleCommand, from.ThrottleCommand);
            Write(to, offset + offset_WindSpeedCommand, from.WindSpeedCommand);
            Write(to, offset + offset_WindDirectionCommand, from.WindDirectionCommand);
            Write(to, offset + offset_GeneratorSwitch, from.GeneratorSwitch);
            Write(to, offset + offset_InverterSwitch, from.InverterSwitch);
            Write(to, offset + offset_BatteryStatus, from.BatteryStatus);
            return(true);
        }
Ejemplo n.º 3
0
        public override void CopyOut(System.IntPtr from, ref object to, int offset)
        {
            FDMDATA dataTo = to as FDMDATA;

            if (dataTo == null)
            {
                dataTo = new FDMDATA();
                to     = dataTo;
            }
            dataTo.ID                   = ReadInt32(from, offset + offset_ID);
            dataTo.Throttle             = ReadDouble(from, offset + offset_Throttle);
            dataTo.ElevatorCommand      = ReadDouble(from, offset + offset_ElevatorCommand);
            dataTo.AileronCommand       = ReadDouble(from, offset + offset_AileronCommand);
            dataTo.RudderCommand        = ReadDouble(from, offset + offset_RudderCommand);
            dataTo.SteerLeft            = ReadDouble(from, offset + offset_SteerLeft);
            dataTo.SteerRight           = ReadDouble(from, offset + offset_SteerRight);
            dataTo.LeftBrakeCommand     = ReadDouble(from, offset + offset_LeftBrakeCommand);
            dataTo.RightBrakeCommand    = ReadDouble(from, offset + offset_RightBrakeCommand);
            dataTo.FlapCommand          = ReadDouble(from, offset + offset_FlapCommand);
            dataTo.EngineStartSwitch    = ReadBoolean(from, offset + offset_EngineStartSwitch);
            dataTo.ThrottleCommand      = ReadDouble(from, offset + offset_ThrottleCommand);
            dataTo.WindSpeedCommand     = ReadDouble(from, offset + offset_WindSpeedCommand);
            dataTo.WindDirectionCommand = ReadDouble(from, offset + offset_WindDirectionCommand);
            dataTo.GeneratorSwitch      = ReadBoolean(from, offset + offset_GeneratorSwitch);
            dataTo.InverterSwitch       = ReadBoolean(from, offset + offset_InverterSwitch);
            dataTo.BatteryStatus        = ReadBoolean(from, offset + offset_BatteryStatus);
        }
Ejemplo n.º 4
0
 public InstanceHandle LookupInstance(
     FDMDATA instance)
 {
     return
         (DDS.OpenSplice.FooDataReader.LookupInstance(
              this,
              instance));
 }
Ejemplo n.º 5
0
        public InstanceHandle LookupInstance(
            FDMDATA instanceData)
        {
            InstanceHandle result = DDS.OpenSplice.FooDataWriter.LookupInstance(
                this,
                instanceData);

            return(result);
        }
Ejemplo n.º 6
0
 public ReturnCode WriteDispose(
     FDMDATA instanceData,
     InstanceHandle instanceHandle)
 {
     return(DDS.OpenSplice.FooDataWriter.WriteDispose(
                this,
                instanceData,
                instanceHandle));
 }
Ejemplo n.º 7
0
 public ReturnCode UnregisterInstance(
     FDMDATA instanceData,
     InstanceHandle instanceHandle)
 {
     return(DDS.OpenSplice.FooDataWriter.UnregisterInstance(
                this,
                instanceData,
                instanceHandle));
 }
Ejemplo n.º 8
0
 public InstanceHandle RegisterInstanceWithTimestamp(
     FDMDATA instanceData,
     Time sourceTimestamp)
 {
     return(DDS.OpenSplice.FooDataWriter.RegisterInstanceWithTimestamp(
                this,
                instanceData,
                sourceTimestamp));
 }
Ejemplo n.º 9
0
 public ReturnCode WriteDisposeWithTimestamp(
     FDMDATA instanceData,
     InstanceHandle instanceHandle,
     Time sourceTimestamp)
 {
     return(DDS.OpenSplice.FooDataWriter.WriteDisposeWithTimestamp(
                this,
                instanceData,
                instanceHandle,
                sourceTimestamp));
 }
Ejemplo n.º 10
0
        public ReturnCode TakeNextSample(
            FDMDATA dataValue,
            SampleInfo sampleInfo)
        {
            object     objectValues = dataValue;
            ReturnCode result       =
                DDS.OpenSplice.FooDataReader.TakeNextSample(
                    this,
                    ref objectValues,
                    ref sampleInfo);

            dataValue = (FDMDATA)objectValues;
            return(result);
        }
Ejemplo n.º 11
0
        public ReturnCode GetKeyValue(
            ref FDMDATA key,
            InstanceHandle instanceHandle)
        {
            object     keyObj = key;
            ReturnCode result = DDS.OpenSplice.FooDataWriter.GetKeyValue(
                this,
                ref keyObj,
                instanceHandle);

            if (keyObj != key)
            {
                key = keyObj as FDMDATA;
            }
            return(result);
        }
Ejemplo n.º 12
0
 public ReturnCode WriteDisposeWithTimestamp(
     FDMDATA instanceData,
     Time sourceTimestamp)
 {
     return(WriteDisposeWithTimestamp(instanceData, InstanceHandle.Nil, sourceTimestamp));
 }
Ejemplo n.º 13
0
 public ReturnCode WriteDispose(
     FDMDATA instanceData)
 {
     return(WriteDispose(instanceData, InstanceHandle.Nil));
 }