/*
 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
 * SPDX-License-Identifier: BSD-3-Clause
 */

// Autogenerated by Thrift Compiler (0.14.1-yarped)
//
// This is an automatically generated file.
// It could get re-generated if the ALLOW_IDL_GENERATION flag is on.

#ifndef YARP_THRIFT_GENERATOR_STRUCT_JOINTDATA_H
#define YARP_THRIFT_GENERATOR_STRUCT_JOINTDATA_H

#include <yarp/dev/api.h>

#include <yarp/os/Wire.h>
#include <yarp/os/idl/WireTypes.h>
#include <yarp/sig/Vector.h>

namespace yarp::dev::impl {

class YARP_dev_API jointData :
        public yarp::os::idl::WirePortable
{
public:
    // Fields
    yarp::sig::VectorOf<double> jointPosition{};
    bool jointPosition_isValid{false};
    yarp::sig::VectorOf<double> jointVelocity{};
    bool jointVelocity_isValid{false};
    yarp::sig::VectorOf<double> jointAcceleration{};
    bool jointAcceleration_isValid{false};
    yarp::sig::VectorOf<double> motorPosition{};
    bool motorPosition_isValid{false};
    yarp::sig::VectorOf<double> motorVelocity{};
    bool motorVelocity_isValid{false};
    yarp::sig::VectorOf<double> motorAcceleration{};
    bool motorAcceleration_isValid{false};
    yarp::sig::VectorOf<double> torque{};
    bool torque_isValid{false};
    yarp::sig::VectorOf<double> pwmDutycycle{};
    bool pwmDutycycle_isValid{false};
    yarp::sig::VectorOf<double> current{};
    bool current_isValid{false};
    yarp::sig::VectorOf<int> controlMode{};
    bool controlMode_isValid{false};
    yarp::sig::VectorOf<int> interactionMode{};
    bool interactionMode_isValid{false};

    // Default constructor
    jointData() = default;

    // Constructor with field values
    jointData(const yarp::sig::VectorOf<double>& jointPosition,
              const bool jointPosition_isValid,
              const yarp::sig::VectorOf<double>& jointVelocity,
              const bool jointVelocity_isValid,
              const yarp::sig::VectorOf<double>& jointAcceleration,
              const bool jointAcceleration_isValid,
              const yarp::sig::VectorOf<double>& motorPosition,
              const bool motorPosition_isValid,
              const yarp::sig::VectorOf<double>& motorVelocity,
              const bool motorVelocity_isValid,
              const yarp::sig::VectorOf<double>& motorAcceleration,
              const bool motorAcceleration_isValid,
              const yarp::sig::VectorOf<double>& torque,
              const bool torque_isValid,
              const yarp::sig::VectorOf<double>& pwmDutycycle,
              const bool pwmDutycycle_isValid,
              const yarp::sig::VectorOf<double>& current,
              const bool current_isValid,
              const yarp::sig::VectorOf<int>& controlMode,
              const bool controlMode_isValid,
              const yarp::sig::VectorOf<int>& interactionMode,
              const bool interactionMode_isValid);

    // Read structure on a Wire
    bool read(yarp::os::idl::WireReader& reader) override;

    // Read structure on a Connection
    bool read(yarp::os::ConnectionReader& connection) override;

    // Write structure on a Wire
    bool write(const yarp::os::idl::WireWriter& writer) const override;

    // Write structure on a Connection
    bool write(yarp::os::ConnectionWriter& connection) const override;

    // Convert to a printable string
    std::string toString() const;

    // If you want to serialize this class without nesting, use this helper
    typedef yarp::os::idl::Unwrapped<jointData> unwrapped;

private:
    // read/write jointPosition field
    bool read_jointPosition(yarp::os::idl::WireReader& reader);
    bool write_jointPosition(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointPosition(yarp::os::idl::WireReader& reader);
    bool nested_write_jointPosition(const yarp::os::idl::WireWriter& writer) const;

    // read/write jointPosition_isValid field
    bool read_jointPosition_isValid(yarp::os::idl::WireReader& reader);
    bool write_jointPosition_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointPosition_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_jointPosition_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write jointVelocity field
    bool read_jointVelocity(yarp::os::idl::WireReader& reader);
    bool write_jointVelocity(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointVelocity(yarp::os::idl::WireReader& reader);
    bool nested_write_jointVelocity(const yarp::os::idl::WireWriter& writer) const;

    // read/write jointVelocity_isValid field
    bool read_jointVelocity_isValid(yarp::os::idl::WireReader& reader);
    bool write_jointVelocity_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointVelocity_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_jointVelocity_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write jointAcceleration field
    bool read_jointAcceleration(yarp::os::idl::WireReader& reader);
    bool write_jointAcceleration(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointAcceleration(yarp::os::idl::WireReader& reader);
    bool nested_write_jointAcceleration(const yarp::os::idl::WireWriter& writer) const;

    // read/write jointAcceleration_isValid field
    bool read_jointAcceleration_isValid(yarp::os::idl::WireReader& reader);
    bool write_jointAcceleration_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_jointAcceleration_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_jointAcceleration_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorPosition field
    bool read_motorPosition(yarp::os::idl::WireReader& reader);
    bool write_motorPosition(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorPosition(yarp::os::idl::WireReader& reader);
    bool nested_write_motorPosition(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorPosition_isValid field
    bool read_motorPosition_isValid(yarp::os::idl::WireReader& reader);
    bool write_motorPosition_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorPosition_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_motorPosition_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorVelocity field
    bool read_motorVelocity(yarp::os::idl::WireReader& reader);
    bool write_motorVelocity(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorVelocity(yarp::os::idl::WireReader& reader);
    bool nested_write_motorVelocity(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorVelocity_isValid field
    bool read_motorVelocity_isValid(yarp::os::idl::WireReader& reader);
    bool write_motorVelocity_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorVelocity_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_motorVelocity_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorAcceleration field
    bool read_motorAcceleration(yarp::os::idl::WireReader& reader);
    bool write_motorAcceleration(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorAcceleration(yarp::os::idl::WireReader& reader);
    bool nested_write_motorAcceleration(const yarp::os::idl::WireWriter& writer) const;

    // read/write motorAcceleration_isValid field
    bool read_motorAcceleration_isValid(yarp::os::idl::WireReader& reader);
    bool write_motorAcceleration_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_motorAcceleration_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_motorAcceleration_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write torque field
    bool read_torque(yarp::os::idl::WireReader& reader);
    bool write_torque(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_torque(yarp::os::idl::WireReader& reader);
    bool nested_write_torque(const yarp::os::idl::WireWriter& writer) const;

    // read/write torque_isValid field
    bool read_torque_isValid(yarp::os::idl::WireReader& reader);
    bool write_torque_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_torque_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_torque_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write pwmDutycycle field
    bool read_pwmDutycycle(yarp::os::idl::WireReader& reader);
    bool write_pwmDutycycle(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_pwmDutycycle(yarp::os::idl::WireReader& reader);
    bool nested_write_pwmDutycycle(const yarp::os::idl::WireWriter& writer) const;

    // read/write pwmDutycycle_isValid field
    bool read_pwmDutycycle_isValid(yarp::os::idl::WireReader& reader);
    bool write_pwmDutycycle_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_pwmDutycycle_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_pwmDutycycle_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write current field
    bool read_current(yarp::os::idl::WireReader& reader);
    bool write_current(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_current(yarp::os::idl::WireReader& reader);
    bool nested_write_current(const yarp::os::idl::WireWriter& writer) const;

    // read/write current_isValid field
    bool read_current_isValid(yarp::os::idl::WireReader& reader);
    bool write_current_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_current_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_current_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write controlMode field
    bool read_controlMode(yarp::os::idl::WireReader& reader);
    bool write_controlMode(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_controlMode(yarp::os::idl::WireReader& reader);
    bool nested_write_controlMode(const yarp::os::idl::WireWriter& writer) const;

    // read/write controlMode_isValid field
    bool read_controlMode_isValid(yarp::os::idl::WireReader& reader);
    bool write_controlMode_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_controlMode_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_controlMode_isValid(const yarp::os::idl::WireWriter& writer) const;

    // read/write interactionMode field
    bool read_interactionMode(yarp::os::idl::WireReader& reader);
    bool write_interactionMode(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_interactionMode(yarp::os::idl::WireReader& reader);
    bool nested_write_interactionMode(const yarp::os::idl::WireWriter& writer) const;

    // read/write interactionMode_isValid field
    bool read_interactionMode_isValid(yarp::os::idl::WireReader& reader);
    bool write_interactionMode_isValid(const yarp::os::idl::WireWriter& writer) const;
    bool nested_read_interactionMode_isValid(yarp::os::idl::WireReader& reader);
    bool nested_write_interactionMode_isValid(const yarp::os::idl::WireWriter& writer) const;
};

} // namespace yarp::dev::impl

#endif // YARP_THRIFT_GENERATOR_STRUCT_JOINTDATA_H
