Beispiel #1
0
        static Displayable[] deserialise_displayables(FReaction reaction)
        {
            var l = reaction.DisplayablesLength;
            var configurations = new Displayable[l];

            for (var i = 0; i < l; i++)
            {
                configurations[i] = deserialise_displayable(reaction.Displayables(i));
            }

            return(configurations);
        }
Beispiel #2
0
        static MotorMotion[] deserialise_motions(FReaction reaction)
        {
            var l       = reaction.MotionsLength;
            var motions = new MotorMotion[l];

            for (var i = 0; i < l; i++)
            {
                motions[i] = deserialise_motion(reaction.Motions(i));
            }

            return(motions);
        }
Beispiel #3
0
        static Configuration[] deserialise_configurations(FReaction reaction)
        {
            var l = reaction.ConfigurationsLength;
            var configurations = new Configuration[l];

            for (var i = 0; i < l; i++)
            {
                configurations[i] = deserialise_configuration(reaction.Configurations(i));
            }

            return(configurations);
        }
Beispiel #4
0
        static Unobservables deserialise_unobservables(FReaction reaction)
        {
            if (reaction.Unobservables.HasValue)
            {
                var bodies = deserialise_bodies(reaction.Unobservables.Value);

                var poses = deserialise_poses(reaction.Unobservables.Value);

                return(new Unobservables(ref bodies, ref poses));
            }

            return(new Unobservables());
        }
Beispiel #5
0
        static ReactionParameters deserialise_parameters(FReaction reaction)
        {
            if (reaction.Parameters.HasValue)
            {
                return(new ReactionParameters(
                           reaction.Parameters.Value.Terminable,
                           reaction.Parameters.Value.Step,
                           reaction.Parameters.Value.Reset,
                           reaction.Parameters.Value.Configure,
                           reaction.Parameters.Value.Describe,
                           reaction.Parameters.Value.EpisodeCount));
            }

            return(_null_reaction_parameters);
        }
Beispiel #6
0
 public FReaction?ReactionsByKey(string key)
 {
     int o = this.__p.__offset(4); return(o != 0 ? FReaction.__lookup_by_key(this.__p.__vector(o), key, this.__p.bb) : null);
 }
Beispiel #7
0
 static String deserialise_simulator_configuration(FReaction reaction_value)
 {
     return(reaction_value.SerialisedMessage);
 }
Beispiel #8
0
 static String deserialise_serialised_message(FReaction reaction_value)
 {
     return(reaction_value.SerialisedMessage);
 }
Beispiel #9
0
 public static FReaction GetRootAsFReaction(ByteBuffer _bb, FReaction obj)
 {
     return(obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }