Skip to content

Commit

Permalink
Merge pull request Xplatforms#4 from Xplatforms/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
Xplatforms authored Oct 5, 2020
2 parents d968400 + a010e00 commit 471cf03
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions ecuseedkeydll.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,22 @@ class ECUSeedKeyDLL : public QObject
explicit ECUSeedKeyDLL(QString dll_path, QObject *parent = nullptr);
~ECUSeedKeyDLL();

Q_PROPERTY(QString ECUName READ ECUName NOTIFY ECUNameChanged);
Q_PROPERTY(QString Comment READ Comment NOTIFY CommentChanged);
Q_PROPERTY(QList<qint32> AccessTypes READ AccessTypes NOTIFY AccessTypesChanged);
Q_PROPERTY(QString errorMsg READ errorMsg WRITE setErrorMsg NOTIFY errorMsgChanged);

QString ECUName() const {return this->p_ecu_name;}
QString Comment() const {return this->p_comment;}
QList<qint32> AccessTypes() {return this->p_access_types.keys();}
QString errorMsg(){return this->p_errorMsg;}
void setErrorMsg(const QString & msg ){if(this->p_errorMsg.compare(msg) == 0)return; this->p_errorMsg = msg; emit errorMsgChanged();}

Q_INVOKABLE qint32 SeedLength(qint32 access_type) {return this->p_access_types.contains(access_type)?
this->p_access_types.value(access_type).seed_len:4; }
Q_INVOKABLE qint32 KeyLength(qint32 access_type) {return this->p_access_types.contains(access_type)?
this->p_access_types.value(access_type).key_len:4; }

Q_INVOKABLE QList<qint32> GenerateKeyFromSeed(QList<qint32> seed, qint32 access_type);

private slots:
Expand Down

0 comments on commit 471cf03

Please sign in to comment.