Librairie pour contrôler un moteur connecté à une contrôleur SDC21XX

Dependencies:   CANopen_Node Roboteq_SDC_serie

SDC21XX_Motor.h

Committer:
kkoichy
Date:
2016-06-01
Revision:
0:1c0bc44980e0

File content as of revision 0:1c0bc44980e0:

#ifndef SDC21XX_MOTOR_H
#define SDC21XX_MOTOR_H

#include "mbed.h"
#include "Roboteq.h"

namespace mbed {
    
    class SDC21XX_Motor {
        
        public :
        
        SDC21XX_Motor(uint8_t _node_id, CAN * _can, uint8_t _channel, uint32_t _reductor);
        void GoAngle(int16_t _angle);
        int16_t GetAngle();
        void SetChannel(uint8_t _channel);
        uint8_t GetChannel(void);
        void SetReductor(uint32_t _reductor);
        uint32_t GetReductor(void);
        void SetNodeID(uint8_t _node_id);
        uint8_t GetNodeID(void);
        void SetCan(CAN * _can);
        CAN* GetCan(void);
        
        private :
        
        protected :
        
        Roboteq RB;
        uint8_t channel;
        uint32_t reductor;
        
        
    };//end class




}//end namespace

#endif