Tyler Veness
fd4c169658
artf4149: Removed references to VxWorks
...
Implemented setTaskPriority() and getTaskPriority() in Task HAL API
Removed all other unimplemented functions in HAL and removed spawnTask()
Replaced instances of pthread_t* with TASK typedef
Removed unused HAL error constants and removed commented-out classes and functions in wpilibj's HALLibrary
Changed Task class API to match the construction semantics of a std::thread
Change-Id: I3bc951a3da90d24c5589fae4d1ca2bb60225c873
2015-07-20 11:49:29 -04:00
James Kuszmaul
5712565068
Removed dependencies on pthread from frcsim.
...
Because we want to be able to compile/run wpilibC++Sim on
windows, we would prefer not to require a windows version
of pthread. This commit moves from pthread constructs to
standard library constructs.
Change-Id: I12392a8910189537dd067afdf017e4994d570a66
2015-07-20 07:06:57 -07:00
Tyler Veness
3f59f3472a
artf4156: Replaced synchronization primitives with C++11 equivalents
...
Change-Id: I90da739347e875efda2a29dd5484b6dda3cd4753
2015-07-20 10:06:08 -04:00
Peter Johnson
98d45777c6
Remove unnecessary llvm qualifier.
2015-07-20 00:19:20 -07:00
Peter Johnson
d059022071
Add logging to TODO.
2015-07-19 23:52:12 -07:00
Peter Johnson
c9260ea785
Change GetEntryTypeFunc to std::function.
...
Also implement it as a member function of Dispatcher.
2015-07-19 23:17:14 -07:00
Peter Johnson
c9ca2f902e
Add TODO list.
2015-07-19 22:56:48 -07:00
Peter Johnson
29691e0ac5
StorageTest: Add LoadPersistent and SavePersistent coverage.
2015-07-19 22:45:20 -07:00
Peter Johnson
a3fcce891f
LoadPersistent: Fix various bugs.
2015-07-19 22:44:34 -07:00
Peter Johnson
8db016c223
SavePersistent: Sort in name order, fix list commas.
2015-07-19 21:10:20 -07:00
Peter Johnson
b0802f3e26
StorageTest: Add fixture classes, add GetEntryInfo test.
2015-07-19 19:43:27 -07:00
Peter Johnson
e4731a4e4e
Storage::GetEntryInfo: Actually filter on types.
2015-07-19 19:42:13 -07:00
Peter Johnson
67ae9e1ba7
Add initial set of unit tests for Storage.
2015-07-19 18:11:36 -07:00
Peter Johnson
d6afbc56c4
Storage: Delete functions now delete from map.
...
This is ok due to the map storing shared_ptr.
2015-07-19 18:10:26 -07:00
Peter Johnson
ffb54872c0
Storage::SetEntryFlags(): Fix deadlock, check for empty name.
2015-07-19 17:50:31 -07:00
Peter Johnson
ead6b4960f
Storage: Use make_shared instead of reset.
2015-07-19 16:46:59 -07:00
Peter Johnson
21b7acc397
Storage: Make testable, make EntriesMap typedef private.
2015-07-19 16:36:30 -07:00
Peter Johnson
173111c64c
ConcurrentQueue: Make mutex mutable.
2015-07-19 16:36:08 -07:00
Peter Johnson
cf18355fe2
Unit tests: Prefer constructor to SetUp() in fixtures.
2015-07-19 16:30:04 -07:00
Peter Johnson
1cc148848b
StartServer: Take persist_filename as a StringRef.
2015-07-19 16:11:56 -07:00
Peter Johnson
ec54904347
Tighten up C++ API implementation a bit.
2015-07-19 16:09:59 -07:00
Peter Johnson
0a18d2e57b
Storage: Make individual entries thread safe.
...
Also use shared_ptr to refer to entries rather than names.
2015-07-19 16:02:21 -07:00
Peter Johnson
c08e2ed8fc
ConcurrentQueue: Add size() function.
2015-07-18 01:32:21 -07:00
Peter Johnson
2437f06c7f
Implement majority of Storage functionality.
...
It's also now thread-safe.
2015-07-18 01:29:51 -07:00
Peter Johnson
9b7e265762
Continue implementing client.
2015-07-18 01:29:24 -07:00
Peter Johnson
c4a7f6ec9b
SavePersistent: Safely save through temp file.
...
Also change SavePersistent and LoadPersistent to take StringRef.
2015-07-18 00:39:08 -07:00
Peter Johnson
d05656b716
StorageEntry: Make data public, remove accessors.
...
Also add id and seq_num fields.
2015-07-17 23:41:25 -07:00
Peter Johnson
04789d9ae4
SequenceNumber: Add default constructor.
2015-07-17 23:41:05 -07:00
Peter Johnson
77acf1f35b
Implement Flush() API.
2015-07-17 22:40:00 -07:00
Peter Johnson
412e8034de
Start implementing client and server.
2015-07-17 22:39:36 -07:00
Peter Johnson
a6162ba990
NetworkConnection: Trigger threads as necessary in Stop().
2015-07-17 22:28:47 -07:00
Peter Johnson
7c51178608
TCPAcceptor: Add shutdown() function.
2015-07-17 22:28:13 -07:00
Peter Johnson
899c489124
TCPStream: Shutdown on close.
2015-07-17 22:27:49 -07:00
Peter Johnson
3062e1e740
Message: Add data accessors.
2015-07-17 19:41:40 -07:00
Peter Johnson
854bfba7c9
Value: Set last_change field.
2015-07-17 11:16:03 -07:00
Peter Johnson
1d4de091f9
Implement nt::Now().
2015-07-17 11:15:44 -07:00
James Kuszmaul
b8f044f8ec
Make the teststand run as lvuser instead of admin.
...
Change-Id: I46c9fee09c99826393d02f792508307a77d14320
2015-07-17 13:32:59 -04:00
Peter Johnson
440916cf2a
Fix string terminator in char** output.
2015-07-17 10:16:46 -07:00
Peter Johnson
3f4feb2f5c
Remove unused variable.
2015-07-17 10:16:31 -07:00
Peter Johnson
3025a7e51e
Finish C wrappers.
2015-07-17 08:47:25 -07:00
Peter Johnson
fcbd2751ba
Provide C++ API. Move all classes to "nt" namespace.
...
The C API is now just simple wrappers around the C++ API.
2015-07-17 07:21:07 -07:00
Peter Johnson
56f1481c24
Add Dispatcher.
2015-07-16 22:55:50 -07:00
Peter Johnson
2ea20b8e81
Value: Use NT_Value for internal storage.
...
This saves a tiny bit of space, but also allows for the NT_Value equivalent
of a Value to be provided with no copy cost (will be useful in the C API).
2015-07-16 21:44:37 -07:00
Peter Johnson
9906116d23
Don't base Value on NT_Value.
...
Also use std::string instead of NT_String.
Conversions to/from the internal structures will be done at the interface.
2015-07-16 01:38:27 -07:00
Peter Johnson
555725a05b
NetworkConnection: Don't explicitly declare default move constructor.
2015-07-15 23:29:17 -07:00
Peter Johnson
13cbf4e288
Message: use shared_ptr.
...
NetworkConnection: Own the input and output queues.
2015-07-15 21:20:18 -07:00
Peter Johnson
beb92e6cbf
NetworkConnection: Ignore duplicate Start() calls.
2015-07-14 23:15:30 -07:00
Peter Johnson
4d3fb3c497
Storage: Use unique_ptr for instance.
2015-07-14 23:15:08 -07:00
Peter Johnson
dbd0c98306
Message: implement MsgType constructor.
2015-07-14 23:09:56 -07:00
Peter Johnson
53fb702512
ConcurrentQueue: Add empty() function.
...
Change-Id: I563c0343f70a5e4577a6387914d821728cbdd007
2015-07-13 22:56:58 -07:00