APIs, concepts, guides, and more
Log.cs
1
25using RSI.RapidCode.dotNET; // Import our RapidCode Library.
26using NUnit.Framework;
27using System;
28
30[TestFixture]
31[Category("Software")]
32class Log : SampleAppTestBase
33{
34 [Test]
35 public void ErrorLog()
36 {
38 // Turn off exceptions. Exceptions will be logged as RsiError objects.
39 axis.ThrowExceptions(false);
40 // Do something that will cause an error (zero acceleration).
41 axis.MoveVelocity(0.0, 0.0);
42
43 while (axis.ErrorLogCountGet() > 0)
44 {
45 RsiError error = axis.ErrorLogGet();
46 Console.WriteLine(error.Message);
47 }
49 }
50}
void MoveVelocity(double velocity)
void ThrowExceptions(bool state)
Configure a class to throw exceptions.
const RsiError *const ErrorLogGet()
Get the next RsiError in the log.
int32_t ErrorLogCountGet()
Get the number of software errors in the error log.