chenluhua1980
2026-01-21 da507a84b7790fa5eab4a01737af5aaca1526390
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "Context.h"
#include "ServoCommo.h"
 
 
namespace SERVO {
    class CSlot
    {
    public:
        CSlot();
        virtual ~CSlot();
 
    public:
        BOOL isEnable();
        void enable();
        void disable();
        BOOL isLock();
        void lock();
        void unlock();
        int getPosition();
        void setPosition(int position);
        int getNo();
        void setNo(int no);
        MaterialsType getType();
        void setType(MaterialsType type);
        std::string& getName();
        void setName(const char* pszName);
        BOOL isEmpty();
        CContext* getContext();
        CContext* getTempContext();
        void setContext(CContext* pContext);
        void setLinkSignalPath(int path);
        int getLinkSignalPath();
        void serialize(CArchive& ar);
 
    private:
        void WriteString(CArchive& ar, std::string& string);
        void ReadString(CArchive& ar, std::string& string);
 
    private:
        int m_nPosition;
        int m_nNo;
        MaterialsType m_materialsType;
        std::string m_strName;
        CContext* m_pContext;
        CContext* m_pTempContext;
        BOOL m_bEnable;
        BOOL m_bLock;
        int m_nLinkSignalPath;
    };
}