diff options
Diffstat (limited to 'src/core/hle/service/nwm/uds_connection.cpp')
-rw-r--r-- | src/core/hle/service/nwm/uds_connection.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/hle/service/nwm/uds_connection.cpp b/src/core/hle/service/nwm/uds_connection.cpp index c8a76ec2a..c74f51253 100644 --- a/src/core/hle/service/nwm/uds_connection.cpp +++ b/src/core/hle/service/nwm/uds_connection.cpp @@ -75,5 +75,14 @@ std::vector<u8> GenerateAssocResponseFrame(AssocStatus status, u16 association_i return data; } +std::tuple<AssocStatus, u16> GetAssociationResult(const std::vector<u8>& body) { + AssociationResponseFrame frame; + memcpy(&frame, body.data(), sizeof(frame)); + + constexpr u16 AssociationIdMask = 0x3FFF; + return std::make_tuple(static_cast<AssocStatus>(frame.status_code), + frame.assoc_id & AssociationIdMask); +} + } // namespace NWM } // namespace Service |