Skip to content

Commit

Permalink
feat: CommitHash pv added for EVG.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerzyjamroz committed Oct 17, 2023
1 parent f320283 commit b21ce7f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
8 changes: 7 additions & 1 deletion evgMrmApp/Db/evgMrm.db
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ record(stringin, "$(P)SwVer-I") {
field(DESC, "Software version")
}

record(stringin, "$(P)CommitHash-I") {
field(DTYP, "Obj Prop string")
field(INP , "@OBJ=$(OBJ), PROP=CommitHash")
field(PINI, "YES")
field(DESC, "Commit hash")
}

record(bo, "$(P)ResetMxc-Cmd") {
field( DTYP, "Obj Prop bool")
field( OUT , "@OBJ=$(OBJ), PROP=Reset MXC")
Expand Down Expand Up @@ -148,4 +155,3 @@ record(longin, "$(P)DbusStatus-RB" ) {
field( INP , "@OBJ=$(OBJ), PROP=DbusStatus")
info( autosaveFields_pass0, "SCAN")
}

3 changes: 1 addition & 2 deletions evgMrmApp/src/evg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ OBJECT_BEGIN(evgMrm) {
OBJECT_PROP1("DbusStatus", &evgMrm::getDbusStatus);
OBJECT_PROP1("Version", &evgMrm::getFwVersionStr);
OBJECT_PROP1("Sw Version", &evgMrm::getSwVersion);
OBJECT_PROP1("CommitHash", &evgMrm::getCommitHash);
OBJECT_PROP2("EvtCode", &evgMrm::writeonly, &evgMrm::setEvtCode);
{
bool (evgMrm::*getter)() const = &evgMrm::isSoftSeconds;
Expand Down Expand Up @@ -78,5 +79,3 @@ OBJECT_BEGIN(evgMrm) {
OBJECT_PROP1("Frequency", &evgMrm::getFrequency);
OBJECT_PROP1("PLL Lock Status", &evgMrm::pllLocked);
} OBJECT_END(evgMrm)


9 changes: 9 additions & 0 deletions evgMrmApp/src/evgMrm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@

#include <epicsExport.h>

#ifndef __COMMIT_HASH
# define __COMMIT_HASH "NotConfigured"
#endif

static
EVRMRM::Config evm_evru_conf = {
"mTCA-EVM-300 (EVRU)",
Expand Down Expand Up @@ -235,6 +239,11 @@ evgMrm::getSwVersion() const {
return MRF_VERSION;
}

std::string
evgMrm::getCommitHash() const {
return __COMMIT_HASH;
}

epicsUInt32
evgMrm::getDbusStatus() const {
return READ32(m_pReg, Status)>>16;
Expand Down
1 change: 1 addition & 0 deletions evgMrmApp/src/evgMrm.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class evgMrm : public mrf::ObjectInst<evgMrm>,
MRFVersion version() const;
std::string getFwVersionStr() const;
std::string getSwVersion() const;
std::string getCommitHash() const;

void enable(epicsUInt16);
epicsUInt16 enabled() const;
Expand Down

0 comments on commit b21ce7f

Please sign in to comment.