1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00
VILLASnode/clients/opal-rt/rtlab-asyncip/models/send_receive/include/msg.h
Steffen Vogel b4c3ef8ac0 fix(opal): Restructure OPAL-RT clients
Signed-off-by: Steffen Vogel <steffen.vogel@opal-rt.com>
2024-10-31 13:29:31 +01:00

35 lines
836 B
C

/* Message related functions.
*
* Author: Steffen Vogel <post@steffenvogel.de>
* SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
// Forward declarations
struct msg;
/* Swaps the byte-order of the message.
*
* Message are always transmitted in network (big endian) byte order.
*
* @param m A pointer to the message
*/
void msg_hdr_ntoh(struct msg *m);
void msg_hdr_hton(struct msg *m);
void msg_ntoh(struct msg *m);
void msg_hton(struct msg *m);
/* Check the consistency of a message.
*
* The functions checks the header fields of a message.
*
* @param m A pointer to the message
* @retval 0 The message header is valid.
* @retval <0 The message header is invalid.
*/
int msg_verify(struct msg *m);