libnexus-rv
msg-encoder.h
Go to the documentation of this file.
1 // SPDX-License-Identifer: Apache 2.0
2 /*
3  * encoder.h - NexusRV encoder functions and declarations
4  *
5  * Copyright (C) 2025, Bo Gan <ganboing@gmail.com>
6  */
7 
8 #ifndef LIBNEXUS_RV_MSG_ENCODER_H
9 #define LIBNEXUS_RV_MSG_ENCODER_H
10 
11 #include "msg-decoder.h"
24 ssize_t nexusrv_msg_encode(const nexusrv_hw_cfg *hwcfg,
25  uint8_t *buffer, size_t limit,
26  const nexusrv_msg *msg);
27 
37 int nexusrv_read_msg(FILE *fp, nexusrv_msg *msg);
38 
39 #endif
int nexusrv_read_msg(FILE *fp, nexusrv_msg *msg)
Read the text (human readable) form of Message from fp into msg.
ssize_t nexusrv_msg_encode(const nexusrv_hw_cfg *hwcfg, uint8_t *buffer, size_t limit, const nexusrv_msg *msg)
Encode the msg into buffer.
NexusRV Message decoder configuration.
Definition: msg-decoder.h:23
Decoded NexusRV Message.
Definition: msg-types.h:92