Changeset View
Changeset View
Standalone View
Standalone View
src/core/atcore.h
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | * | 45 | * | ||
46 | * #### General Workflow | 46 | * #### General Workflow | ||
47 | * - Connect to a serial port with initSerial() | 47 | * - Connect to a serial port with initSerial() | ||
48 | * - Firmware will be auto detected. Use loadFirmwarePLugin() to force load a firmware. | 48 | * - Firmware will be auto detected. Use loadFirmwarePLugin() to force load a firmware. | ||
49 | * - Send commands to the device (pushCommand(),print(),...) | 49 | * - Send commands to the device (pushCommand(),print(),...) | ||
50 | * - AtCore::close() when you are all done. | 50 | * - AtCore::close() when you are all done. | ||
51 | 51 | | |||
52 | * #### How AtCore Finds Plugins. | 52 | * #### How AtCore Finds Plugins. | ||
53 | * - Windows and Mac Os will always look in appdir/plugins for plugins. | 53 | * Searched Paths: | ||
54 | * | | |||
55 | * Others Search: | | |||
56 | * 1. Build Dir/plugins (buildtime) | 54 | * 1. Build Dir/plugins (buildtime) | ||
57 | * 2. ECM set KDE PLUGIN DIR (buildtime) | 55 | * 2. ECM set KDE PLUGIN DIR (buildtime) | ||
58 | * 3. Qt Plugin path/AtCore (runtime) | 56 | * 3. Qt Plugin path/AtCore (runtime) | ||
59 | * 4. plugins (runtime) | 57 | * 4. Fullpath of KDE_PLUGIN_DIR (buildtime) | ||
58 | * 5. Program using atcore's path/plugins (runtime) | ||||
60 | */ | 59 | */ | ||
patrickelectric: is this from the binary path or where is being called ? | |||||
61 | class ATCORE_EXPORT AtCore : public QObject | 60 | class ATCORE_EXPORT AtCore : public QObject | ||
62 | { | 61 | { | ||
63 | Q_OBJECT | 62 | Q_OBJECT | ||
64 | Q_PROPERTY(QString version READ version) | 63 | Q_PROPERTY(QString version READ version) | ||
65 | Q_PROPERTY(QStringList availableFirmwarePlugins READ availableFirmwarePlugins) | 64 | Q_PROPERTY(QStringList availableFirmwarePlugins READ availableFirmwarePlugins) | ||
66 | Q_PROPERTY(int extruderCount READ extruderCount NOTIFY extruderCountChanged) | 65 | Q_PROPERTY(int extruderCount READ extruderCount WRITE setExtruderCount NOTIFY extruderCountChanged) | ||
67 | Q_PROPERTY(quint16 serialTimerInterval READ serialTimerInterval WRITE setSerialTimerInterval NOTIFY serialTimerIntervalChanged) | 66 | Q_PROPERTY(quint16 serialTimerInterval READ serialTimerInterval WRITE setSerialTimerInterval NOTIFY serialTimerIntervalChanged) | ||
68 | Q_PROPERTY(QStringList serialPorts READ serialPorts NOTIFY portsChanged) | 67 | Q_PROPERTY(QStringList serialPorts READ serialPorts NOTIFY portsChanged) | ||
69 | Q_PROPERTY(float percentagePrinted READ percentagePrinted NOTIFY printProgressChanged) | 68 | Q_PROPERTY(float percentagePrinted READ percentagePrinted NOTIFY printProgressChanged) | ||
70 | Q_PROPERTY(QStringList portSpeeds READ portSpeeds) | 69 | Q_PROPERTY(QStringList portSpeeds READ portSpeeds) | ||
71 | Q_PROPERTY(QString connectedPort READ connectedPort) | 70 | Q_PROPERTY(QString connectedPort READ connectedPort) | ||
72 | Q_PROPERTY(AtCore::STATES state READ state WRITE setState NOTIFY stateChanged) | 71 | Q_PROPERTY(AtCore::STATES state READ state WRITE setState NOTIFY stateChanged) | ||
73 | Q_PROPERTY(bool sdMount READ isSdMounted WRITE setSdMounted NOTIFY sdMountChanged) | 72 | Q_PROPERTY(bool sdMount READ isSdMounted WRITE setSdMounted NOTIFY sdMountChanged) | ||
74 | Q_PROPERTY(QStringList sdFileList READ sdFileList NOTIFY sdCardFileListChanged) | 73 | Q_PROPERTY(QStringList sdFileList READ sdFileList NOTIFY sdCardFileListChanged) | ||
75 | 74 | | |||
75 | friend class AtCoreTests; | ||||
76 | //Add friends as Sd Card support is extended to more plugins. | 76 | //Add friends as Sd Card support is extended to more plugins. | ||
77 | friend class RepetierPlugin; | 77 | friend class RepetierPlugin; | ||
78 | friend class MarlinPlugin; | 78 | friend class MarlinPlugin; | ||
79 | //friend class SmoothiePlugin; | 79 | //friend class SmoothiePlugin; | ||
80 | //friend class TeacupPlugin; | 80 | //friend class TeacupPlugin; | ||
81 | //friend class AprinterPlugin; | 81 | //friend class AprinterPlugin; | ||
82 | //friend class SprinterPlugin; | 82 | //friend class SprinterPlugin; | ||
83 | 83 | | |||
▲ Show 20 Lines • Show All 108 Lines • ▼ Show 20 Line(s) | 84 | public: | |||
192 | * @return State of the printer | 192 | * @return State of the printer | ||
193 | * @sa setState(),stateChanged(),AtCore::STATES | 193 | * @sa setState(),stateChanged(),AtCore::STATES | ||
194 | */ | 194 | */ | ||
195 | AtCore::STATES state(void); | 195 | AtCore::STATES state(void); | ||
196 | 196 | | |||
197 | /** | 197 | /** | ||
198 | * @brief extruderCount | 198 | * @brief extruderCount | ||
199 | * @return The number of detected Extruders Default is 1 | 199 | * @return The number of detected Extruders Default is 1 | ||
200 | * @sa setExtruderCount(int newCount), extruderCountChanged(int newCount) | ||||
200 | */ | 201 | */ | ||
201 | int extruderCount() const; | 202 | int extruderCount() const; | ||
202 | 203 | | |||
203 | /** | 204 | /** | ||
204 | * @brief Return printed percentage | 205 | * @brief Return printed percentage | ||
205 | * @sa printProgressChanged() | 206 | * @sa printProgressChanged() | ||
206 | */ | 207 | */ | ||
207 | float percentagePrinted() const; | 208 | float percentagePrinted() const; | ||
Show All 31 Lines | |||||
239 | * @return True if card mounted | 240 | * @return True if card mounted | ||
240 | */ | 241 | */ | ||
241 | bool isSdMounted() const; | 242 | bool isSdMounted() const; | ||
242 | 243 | | |||
243 | signals: | 244 | signals: | ||
244 | 245 | | |||
245 | /** | 246 | /** | ||
246 | * @brief New number of extruders | 247 | * @brief New number of extruders | ||
247 | * @sa extruderCount() | 248 | * @sa extruderCount(), setExtruderCount(int newCount) | ||
248 | */ | 249 | */ | ||
249 | void extruderCountChanged(); | 250 | void extruderCountChanged(const int newCount); | ||
250 | 251 | | |||
251 | /** | 252 | /** | ||
252 | * @brief Print job's precentage changed. | 253 | * @brief Print job's precentage changed. | ||
253 | * @param newProgress : Message | 254 | * @param newProgress : Message | ||
254 | * @sa percentagePrinted() | 255 | * @sa percentagePrinted() | ||
255 | */ | 256 | */ | ||
256 | void printProgressChanged(const float &newProgress); | 257 | void printProgressChanged(const float &newProgress); | ||
257 | 258 | | |||
258 | /** | 259 | /** | ||
259 | * @brief New message was received from the printer | 260 | * @brief New message was received from the printer | ||
260 | * @param message: Message that was received | 261 | * @param message: Message that was received | ||
261 | */ | 262 | */ | ||
262 | void receivedMessage(const QByteArray &message); | 263 | void receivedMessage(const QByteArray &message); | ||
263 | 264 | | |||
264 | /** | 265 | /** | ||
265 | * @brief New interval between serial timer | 266 | * @brief New interval between serial timer | ||
266 | * @sa setSerialTimerInterval() | 267 | * @sa setSerialTimerInterval() | ||
267 | */ | 268 | */ | ||
268 | void serialTimerIntervalChanged(); | 269 | void serialTimerIntervalChanged(const quint16 newTime); | ||
patrickelectric: uint16_t | |||||
rizzitello: quint16 is the same type as the other serialTimer stuff. | |||||
269 | 270 | | |||
270 | /** | 271 | /** | ||
271 | * @brief The Printer's State Changed | 272 | * @brief The Printer's State Changed | ||
272 | * @param newState : the new state of the printer | 273 | * @param newState : the new state of the printer | ||
273 | * @sa setState(),state(),AtCore::STATES | 274 | * @sa setState(),state(),AtCore::STATES | ||
274 | */ | 275 | */ | ||
275 | void stateChanged(AtCore::STATES newState); | 276 | void stateChanged(AtCore::STATES newState); | ||
276 | 277 | | |||
▲ Show 20 Lines • Show All 251 Lines • ▼ Show 20 Line(s) | 497 | private: | |||
528 | 529 | | |||
529 | /** | 530 | /** | ||
530 | * @brief Hold private data of AtCore. | 531 | * @brief Hold private data of AtCore. | ||
531 | */ | 532 | */ | ||
532 | AtCorePrivate *d; | 533 | AtCorePrivate *d; | ||
533 | 534 | | |||
534 | protected: | 535 | protected: | ||
535 | /** | 536 | /** | ||
537 | * @brief Set the number of extruders on the machine. | ||||
538 | * @param newCount | ||||
539 | * @sa extruderCount(), extruderCountChanged(int newCount) | ||||
540 | */ | ||||
541 | void setExtruderCount(int newCount); | ||||
542 | /** | ||||
536 | * @brief Append a file to AtCorePrivate::sdCardFileList. | 543 | * @brief Append a file to AtCorePrivate::sdCardFileList. | ||
537 | * @param fileName: new FileName | 544 | * @param fileName: new FileName | ||
538 | */ | 545 | */ | ||
539 | void appendSdCardFileList(const QString &fileName); | 546 | void appendSdCardFileList(const QString &fileName); | ||
540 | 547 | | |||
541 | /** | 548 | /** | ||
542 | * @brief Clear AtCorePrivate::sdCardFileList. | 549 | * @brief Clear AtCorePrivate::sdCardFileList. | ||
543 | */ | 550 | */ | ||
Show All 14 Lines |
is this from the binary path or where is being called ?