|
1 | | -# Error handling for NIDAQmx |
| 1 | +# Error handling for DAQmx.jl |
2 | 2 |
|
3 | 3 | # Helper functions for pointer type conversions |
4 | | -# NIDAQmx generated functions expect Ptr{Cchar} for strings |
| 4 | +# NI-DAQmx generated functions expect Ptr{Cchar} for strings |
5 | 5 | _cstr(s::String) = Ptr{Cchar}(pointer(s)) |
6 | 6 | const NULLSTR = Ptr{Cchar}() |
7 | 7 |
|
|
45 | 45 | """ |
46 | 46 | get_error_message(code::Int32) -> String |
47 | 47 |
|
48 | | -Retrieve the error message string for a given NIDAQmx error or warning code. |
| 48 | +Retrieve the error message string for a given NI-DAQmx error or warning code. |
49 | 49 | """ |
50 | 50 | function get_error_message(code::Int32) |
51 | 51 | # First call to get buffer size |
|
82 | 82 | """ |
83 | 83 | check_error(code::Int32) |
84 | 84 |
|
85 | | -Check a NIDAQmx return code and handle errors/warnings appropriately. |
| 85 | +Check an NI-DAQmx return code and handle errors/warnings appropriately. |
86 | 86 |
|
87 | 87 | - If `code == 0`: Success, returns `nothing`. |
88 | 88 | - If `code > 0`: Warning, logs a warning message and returns `nothing`. |
89 | | -- If `code < 0`: Error, throws a `NIDAQError` exception. |
| 89 | +- If `code < 0`: Error, throws a `DAQmxError` exception. |
90 | 90 |
|
91 | 91 | # Arguments |
92 | | -- `code::Int32`: The return code from a NIDAQmx function. |
| 92 | +- `code::Int32`: The return code from an NI-DAQmx function. |
93 | 93 |
|
94 | 94 | # Throws |
95 | 95 | - `DAQmxError`: If `code < 0`. |
|
117 | 117 | """ |
118 | 118 | @check expr |
119 | 119 |
|
120 | | -Macro to check the return code of a NIDAQmx function call. |
| 120 | +Macro to check the return code of an NI-DAQmx function call. |
121 | 121 |
|
122 | 122 | # Example |
123 | 123 | ```julia |
|
0 commit comments