[spinel] add get iid method (#10516)

This commit adds a method to get spinel interface Id in
`SpinelDriver`.

This is to enable the user class of `SpinelDriver` can compose the
spinel header itself.
This commit is contained in:
Li Cao
2024-07-15 10:43:40 -07:00
committed by GitHub
parent 9b57797c0a
commit 6f2d8b6b22
+8
View File
@@ -210,6 +210,14 @@ public:
*/
bool CoprocessorHasCap(unsigned int aCapability) { return mCoprocessorCaps.Contains(aCapability); }
/**
* Returns the spinel interface id.
*
* @returns the spinel interface id.
*
*/
spinel_iid_t GetIid(void) { return mIid; }
private:
static constexpr uint16_t kMaxSpinelFrame = SPINEL_FRAME_MAX_SIZE;
static constexpr uint16_t kVersionStringSize = 128;