Commit Graph

234 Commits

Author SHA1 Message Date
Michael Davidsaver
6e62e123e8 FieldBuilder allow append to Structure
Helpful to allow a new definition to be created
as an extension of an existing definition.
2017-05-15 12:46:32 -04:00
Michael Davidsaver
262df56024 testFieldBuilder: cleanup 2017-05-12 14:26:18 -04:00
Michael Davidsaver
c5ce75888e Merge remote-tracking branch 'md/overhaulbytebuf'
* md/overhaulbytebuf:
  overhaul byteBuffer implementation
2017-05-10 15:36:49 -04:00
Michael Davidsaver
08fc3cab38 update testPVUnion 2017-04-15 16:19:23 -04:00
Michael Davidsaver
a3c57a5077 bitSet: add logical_and()/_or()
Basic logical operations for tests
where a temporary can be avoided.
2017-04-15 16:19:15 -04:00
Michael Davidsaver
a9111d78d3 overhaul byteBuffer implementation
align(n) now fills skipped bytes with '\0'.

align(n,f) to choose a different fill value.

No other changes intended

Use intrinsic byte order swapping builtins for gcc, clang, and msvc.

use assert() to check pre/post conditions.

Remove unused condition macros and unreachable code.

Add tests of byte swapping primitives and
test the correctness of unaligned operations.

add illustrations of flip() and rewind()
2017-04-07 15:09:47 -04:00
Dave Hickin
cc91e22038 testThread: Namespace qualify Thread
Fixes build error with latest RTEMS (Thread ambiguous).
2016-09-16 21:22:33 +01:00
Michael Davidsaver
da8ba56dd1 testTypeCast: mangle values to be printable
print  (u)int8 as integer instead of character
2016-09-07 15:29:58 -04:00
Michael Davidsaver
4d6d5620b0 Revert "testTypeCast: Escape non-printing characters"
This reverts commit f7cad98f3e.
2016-09-07 15:28:48 -04:00
Dave Hickin
f7cad98f3e testTypeCast: Escape non-printing characters 2016-09-07 14:40:16 +01:00
Dave Hickin
d9072402db Update source boilerplate for new LICENSE file 2016-07-22 15:56:43 +01:00
Dave Hickin
1e980651a9 Use template getSubField when type known
Replace non-template getSubField with template version when PVField is
of a known, derived type.
2016-07-04 17:03:07 +01:00
Andrew Johnson
2ee8769752 Prevent redefinition of NOMINMAX
While this protection is not strictly necessary here, if someone
does a cut-and-paste into a header file it should be included.
2016-04-06 15:29:30 -05:00
dhickin
bd4b65225c Merge pull request #28 from mdavidsaver/overhaulbitset
bitSet: macros and vector storage
2016-03-17 14:20:20 +00:00
Matej Sekoranja
ae7976fc01 Merge remote-tracking branch 'epics-base/master' 2016-03-06 21:33:43 +01:00
Matej Sekoranja
72f9dc4c7c win32 compilation fix 2016-03-06 21:29:04 +01:00
Michael Davidsaver
b0df40d9a6 testSharedVector more PG locals 2016-03-01 13:25:20 -05:00
Michael Davidsaver
a8ba831f5e fix freeze() of shared_vector<void> 2016-02-26 12:13:23 -05:00
Michael Davidsaver
4546fda8e9 note shared_vector casts which should fail 2016-02-26 12:13:23 -05:00
Michael Davidsaver
dc94b26e50 fix static_shared_vector_cast<>() no-op casting
Turns out that Enablers as typically used for
member functions don't work to select
constructors.

Move this selection logic to
struct detail::static_shared_vector_caster<>
to correctly allow no-op casts (eg. void to void).
Previously this would not compile.

Allows PVScalarArray getAs() and putFrom() using
shared_vector<const void>.
2016-02-26 12:13:23 -05:00
Michael Davidsaver
4c32f37ede bitSet: macros and vector storage
use std::vector<uint64> to manage storage.
Make some global variable "constants" into macros.
add swap()
2016-02-18 18:39:32 -05:00
Dave Hickin
faecea39c8 Merge branch 'master' of github.com:msekoranja/pvDataCPP 2016-02-18 15:35:36 +00:00
Michael Davidsaver
d08d5362be testBitSet: forgot to update test count 2016-02-17 10:53:32 -05:00
Michael Davidsaver
d4292d81f2 BitSet: truncation in or_and
For "this |= set1 & set2" the result size
should be "max(this, min(set1, set2))" while
at present it is "min(set1, set2)" resulting
in truncation if the LHS is longer than the
RHS.
2016-02-17 10:17:21 -05:00
Michael Davidsaver
62893e33e9 testBitSet: demo bug in BitSet::or_and
Incorrect handling of wordsInUse truncates if
RHS (b1 & b2) is shorter than LHS (b3).
2016-02-17 10:17:16 -05:00
Michael Davidsaver
5b07ecbd01 testBitSet more diag output 2016-02-17 10:17:04 -05:00
Matej Sekoranja
65ff7ab1c3 fixed bitSet serialization 2016-02-12 19:35:44 +01:00
Michael Davidsaver
3b2e9b2485 move all headers to pv/ 2016-02-10 14:40:29 +00:00
Michael Davidsaver
e35c6f29fb add deserializeFrom* helpers 2016-02-05 18:34:16 -05:00
Michael Davidsaver
85a1a48b00 add serializeToVector 2016-01-27 11:25:09 -05:00
Michael Davidsaver
01172217dc Merge remote-tracking branch 'md/threadconfig'
* md/threadconfig:
  new Thread::Config
2015-12-29 18:34:18 -05:00
Michael Davidsaver
abc5c5a374 new Thread::Config 2015-11-23 15:21:21 -05:00
Michael Davidsaver
6641e7f5d1 fix testCreateRequest
field names may not begin with a digit
2015-11-23 14:33:43 -05:00
Michael Davidsaver
3714be4f16 fail zero length field names 2015-09-24 13:04:49 -04:00
Michael Davidsaver
f24f565e58 validate field names
check for invalid characters in field names (eg '.').

Restrict character set to ascii alpha numeric and '_'.
2015-09-23 15:32:46 -04:00
Andrew Johnson
f6cf87a52d Fix build problem on Mac
../../testApp/pv/testPVData.cpp:549:14: error: use of overloaded operator '!='
      is ambiguous (with operand types 'PVIntPtr' (aka 'shared_ptr<PVInt>') and
      'long')
    testOk1(a!=NULL);
            ~^ ~~~~
2015-08-12 15:06:46 -05:00
Dave Hickin
3487b3ee9e Remove unused argument in testPVScalarArray 2015-07-24 11:22:50 +01:00
Dave Hickin
5834efb709 Remove calls of deprecated getScalarArrayField 2015-07-24 11:21:58 +01:00
Dave Hickin
ac2b6ea8db Make getSubFieldT return shared pointer
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-13 12:48:05 +01:00
Dave Hickin
ebe2d6196c Rename getAs getSubFieldT
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-13 12:34:15 +01:00
Dave Hickin
e4689dd3f8 Added unit tests for functions for getting subfields
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-13 12:07:54 +01:00
Dave Hickin
d9963b0631 Add test for getAs when mid-field not structure
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-09 13:22:42 +01:00
Dave Hickin
40952df965 Corrected spelling in test and exception messages
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-08 18:19:53 +01:00
Dave Hickin
4f2c51c480 Correct spelling and typos in doxygen and comments
Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
2015-07-08 18:18:37 +01:00
Marty Kraimer
1e646f8df1 Merge pull request #4 from mdavidsaver/getasfield
Add PVStructure::getAs<>()
2015-06-23 07:24:30 -04:00
Michael Davidsaver
eadb8ff65b add PVStructure::getAs<>() for field access w/o NULL 2015-06-22 18:14:23 -04:00
Michael Davidsaver
6a80e941a0 replace use of depercated methods 2015-06-22 14:36:27 -04:00
Matej Sekoranja
a1b89c9a3b PVScalar::copy made public; copy tests 2015-02-17 21:54:35 +01:00
Matej Sekoranja
d6921fdac0 removal of some methods from convert 2015-02-17 20:22:37 +01:00
Matej Sekoranja
b13bb9819a updated testPlan(0) to actual value 2015-02-11 20:56:38 +01:00