forked from M-Labs/nac3
39 lines
761 B
C++
39 lines
761 B
C++
#pragma once
|
|
|
|
#include <irrt/int_defs.hpp>
|
|
|
|
/*
|
|
This file defines all ARTIQ-specific structures
|
|
*/
|
|
|
|
/**
|
|
* @brief ARTIQ's `cslice` object
|
|
*
|
|
* See https://docs.rs/cslice/0.3.0/src/cslice/lib.rs.html#33-37
|
|
*/
|
|
template <typename SizeT>
|
|
struct CSlice {
|
|
const char *base;
|
|
SizeT len;
|
|
};
|
|
|
|
/**
|
|
* @brief Int type of ARTIQ's `Exception` IDs.
|
|
*/
|
|
typedef uint32_t ExceptionId;
|
|
|
|
/**
|
|
* @brief ARTIQ's `Exception` object
|
|
*
|
|
* See https://github.com/m-labs/artiq/blob/b0d2705c385f64b6e6711c1726cd9178f40b598e/artiq/firmware/libeh/eh_artiq.rs#L1C1-L17C1
|
|
*/
|
|
template <typename SizeT>
|
|
struct Exception {
|
|
ExceptionId id;
|
|
CSlice<SizeT> file;
|
|
uint32_t line;
|
|
uint32_t column;
|
|
CSlice<SizeT> function;
|
|
CSlice<SizeT> message;
|
|
uint32_t param;
|
|
}; |