/** * @file include/di/can/raw.h * @brief raw * @date Sep 2, 2015 * @author rheijden * @copyright 2015 Dual Inventive Technology Centre B.V. * * raw */ #ifndef LIBDI_INCLUDE_DI_CAN_RAW_H_ #define LIBDI_INCLUDE_DI_CAN_RAW_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include /** * Send raw message buffer * @param ctx CAN driver context * @param dst_id Destination NodeID * @param ttype Transfer type * @param dtype Message data type * @param ptype Message payload type * @param buf Buffer to write into * @param size Size of buffer * @return DNOK on success */ di_errno_t di_can_raw_send(struct di_can_ctx *ctx, uint32_t dst_id, enum di_can_transfertype ttype, enum di_can_raw_dtypes dtype, enum di_can_ptypes ptype, const void *buf, size_t size); /** * Send NULL terminated device:uid * @param ctx CAN context * @param dst_id Destination NodeID * @param ttype Transfer type * @param uid device:uid (must be null terminated 32 character string) */ di_errno_t di_can_raw_send_device_uid(struct di_can_ctx *ctx, uint32_t dst_id, enum di_can_transfertype ttype, const char uid[33]); /** * Send raw message * @param msg CAN message * @param type Message type * @return DNOK on success */ di_errno_t di_can_raw_send_msg(struct di_can_msg **msg, enum di_can_raw_dtypes type); #ifdef __cplusplus } #endif #endif /* LIBDI_INCLUDE_DI_CAN_RAW_H_ */