forked from HWiese1980/remoteApiNETWrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVREPSetBlock.cs
More file actions
22 lines (19 loc) · 722 Bytes
/
VREPSetBlock.cs
File metadata and controls
22 lines (19 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
using System;
namespace remoteApiNETWrapper
{
public class VREPSetBlock : IDisposable
{
private readonly int clientID;
public VREPSetBlock(int cID)
{
// Console.WriteLine("--- Opening Set Block -----");
clientID = cID;
if (VREPWrapper.simxPauseCommunication(cID, 1) != 0) throw new VREPException(simx_error.remote_error_flag, "Pausing communication failed");
}
public void Dispose()
{
if (VREPWrapper.simxPauseCommunication(clientID, 0) != 0) throw new VREPException(simx_error.remote_error_flag, "Restarting communication failed");
// Console.WriteLine("--- Set Block closed ------");
}
}
}