ifw-fcf 8.0.2
 
Loading...
Searching...
No Matches
mockHelpers.hpp File Reference

Mirror of devmgr/common/test/mock/mockHelpers.hpp. See that file for documentation. Duplicated because the device test suite does not link against the common test library. More...

#include <ifw/fnd/defs/iCommAdapter.hpp>
#include <string>
#include <utility>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  ifw
 
namespace  ifw::fcf
 ActionsEnable class source file.
 
namespace  ifw::fcf::devmgr
 actuatorLcsIf class header file.
 
namespace  ifw::fcf::devmgr::test
 

Functions

ifw::fnd::defs::CallResult ifw::fcf::devmgr::test::MakeRpcReply (short code, ifw::fnd::defs::Status batch_status=ifw::fnd::defs::Status::Ok)
 Build a CallResult that carries a single short reply code, matching the convention every FCF RPC uses (RPC reply in output_arguments[0].data.value as short).
 
ifw::fnd::defs::ReadResult ifw::fcf::devmgr::test::MakeReadReply (std::vector< std::pair< std::string, ifw::fnd::defs::Value > > items)
 Build a ReadResult from a list of (address, value) pairs. Every item is marked Ok. Suitable for stubbing the node-status reads done by DeviceLcsIf.
 
ifw::fnd::defs::Result ifw::fcf::devmgr::test::MakeOk ()
 Build a generic "Ok" Result.
 
ifw::fnd::defs::WriteResult ifw::fcf::devmgr::test::MakeWriteOk (const ifw::fnd::defs::WriteRequest &req)
 Build a WriteResult that succeeds for every item address in the request. Reflects the typical Write success path.
 
ifw::fnd::defs::SubscribeResult ifw::fcf::devmgr::test::MakeSubscribeOk (const std::vector< ifw::fnd::defs::Address > &nodes)
 Build a SubscribeResult acknowledging every requested node.
 
ifw::fnd::defs::Notification ifw::fcf::devmgr::test::MakeNotification (const std::string &address, const ifw::fnd::defs::Value &value)
 Build a single-attribute Notification suitable for feeding to a Listener that uses m_ua_status_map. The test caller computes the node-id the same way DeviceLcsIf does (GetNodeId(GetMapValue(...))).
 

Detailed Description

Mirror of devmgr/common/test/mock/mockHelpers.hpp. See that file for documentation. Duplicated because the device test suite does not link against the common test library.