| #include "base_disc_state_machine.hpp" |
| |
| #include <stdplus/print.hpp> |
| #include <util/common.hpp> |
| |
| BaseDiscoveryStateMachine::BaseDiscoveryStateMachine( |
| int fd, const std::string& deviceName, int netId) : |
| fd(fd), |
| deviceName(deviceName), netId(netId) |
| { |
| stdplus::print(stderr, "Initializing base discovery state machine...\n"); |
| this->initialized = true; |
| this->requesterStatus = StateMachineStatus::NoPendingAction; |
| this->eid = DEST_EID; |
| this->instanceId = INSTANCE_ID; // TODO(@harshtya): Make this dynamic |
| } |
| |
| OperationStatus BaseDiscoveryStateMachine::run() |
| { |
| // TODO(@harshtya): Implement run function for state machine |
| return OperationStatus::Success; |
| } |
| |
| OperationStatus BaseDiscoveryStateMachine::triggerNextCommand() |
| { |
| // TODO(@harshtya): Implement State Machine |
| return OperationStatus::Success; |
| } |
| |
| OperationStatus BaseDiscoveryStateMachine::pushCommandResponse( |
| [[maybe_unused]] struct pldm_msg* respMsg, [[maybe_unused]] size_t respSize) |
| { |
| // TODO(@harshtya): Implement pushCommandResponse |
| return OperationStatus::Success; |
| } |
| |
| void BaseDiscoveryStateMachine::printState() |
| { |
| // TODO(@harshtya): Implement state print for debug |
| } |