Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Commit

Permalink
Merge pull request #96 from apollo-lhc/feature/apollosm-shelf-id
Browse files Browse the repository at this point in the history
Read the SHELF_ID register as a string
  • Loading branch information
alpakpinar authored Mar 30, 2023
2 parents 13c8f98 + db3787a commit e2f5c4c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/ApolloSM/ApolloSM.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public:

int GetSerialNumber();
int GetRevNumber();
int GetShelfID();
int GetSlot();
std::string GetShelfID();
uint32_t GetZynqIP();
uint32_t GetIPMCIP();

Expand Down
8 changes: 4 additions & 4 deletions src/ApolloSM/ApolloSM_info.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ int ApolloSM::GetRevNumber(){
}
return ret;
};
int ApolloSM::GetShelfID(){
int ret = -1; //default value
std::string ApolloSM::GetShelfID(){
std::string ret = ""; //default value
try{
ret = ReadRegister("SLAVE_I2C.S1.SM.INFO.SLOT");
ret = ReadString("SLAVE_I2C.S6.SHELF_ID");
}catch(BUException::BAD_REG_NAME & e2){
//eat this exception and just return -1;
//eat this exception and just return an empty string
}
return ret;
};
Expand Down

0 comments on commit e2f5c4c

Please sign in to comment.