123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418 |
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 2018 (c) basysKom GmbH <opensource@basyskom.com> (Author: Peter Rustler)
- */
- /* Data in this header is gathered from OPC Unified Architecture, Part 11, Release
- 1.03 Page 5-6 from OPC Foundation */
- #ifndef UA_HISTORICAL_READ_TEST_DATA_H_
- #define UA_HISTORICAL_READ_TEST_DATA_H_
- #include <open62541/types.h>
- #include <limits.h>
- typedef struct {
- UA_DateTime start;
- UA_DateTime end;
- UA_UInt32 numValuesPerNode;
- UA_Boolean returnBounds;
- UA_DateTime result[8];
- UA_Boolean returnContinuationPoint;
- } testTuple;
- #define TIMESTAMP_UNSPECIFIED LLONG_MIN
- #define NODATA 0
- #define TIMESTAMP_FIRST 1
- #define TIMESTAMP_4_48 (448 * UA_DATETIME_SEC)
- #define TIMESTAMP_4_58 (458 * UA_DATETIME_SEC)
- #define TIMESTAMP_4_59 (459 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_00 (500 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_01 (501 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_02 (502 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_03 (503 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_04 (504 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_05 (505 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_06 (506 * UA_DATETIME_SEC)
- #define TIMESTAMP_5_07 (507 * UA_DATETIME_SEC)
- #define TIMESTAMP_LAST (600 * UA_DATETIME_SEC)
- static UA_DateTime testData[] = {
- TIMESTAMP_5_03,
- TIMESTAMP_5_00,
- TIMESTAMP_5_02,
- TIMESTAMP_5_06,
- TIMESTAMP_5_05,
- 0 // last element
- };
- #define DELETE_START_TIME TIMESTAMP_5_03
- #define DELETE_STOP_TIME TIMESTAMP_5_06
- static UA_DateTime testDataAfterDelete[] = {
- TIMESTAMP_5_00,
- TIMESTAMP_5_02,
- TIMESTAMP_5_06,
- 0 // last element
- };
- static UA_StatusCode testDataUpdateResult[] = {
- UA_STATUSCODE_GOODENTRYREPLACED,
- UA_STATUSCODE_GOODENTRYREPLACED,
- UA_STATUSCODE_GOODENTRYINSERTED,
- UA_STATUSCODE_GOODENTRYINSERTED,
- UA_STATUSCODE_GOODENTRYREPLACED
- };
- static testTuple testRequests[] =
- {
- { TIMESTAMP_5_00,
- TIMESTAMP_5_05,
- 0,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_05,
- 0,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_04,
- 0,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_04,
- 0,
- false,
- { TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_05,
- TIMESTAMP_5_00,
- 0,
- true,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_5_05,
- TIMESTAMP_5_00,
- 0,
- false,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_5_04,
- TIMESTAMP_5_01,
- 0,
- true,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_5_04,
- TIMESTAMP_5_01,
- 0,
- false,
- { TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_4_59,
- TIMESTAMP_5_05,
- 0,
- true,
- { TIMESTAMP_FIRST, TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, 0 },
- false
- },
- { TIMESTAMP_4_59,
- TIMESTAMP_5_05,
- 0,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_07,
- 0,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, TIMESTAMP_5_06, TIMESTAMP_LAST, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_07,
- 0,
- false,
- { TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, TIMESTAMP_5_06, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_05,
- 3,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_05,
- 3,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_04,
- 3,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_04,
- 3,
- false,
- { TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_05,
- TIMESTAMP_5_00,
- 3,
- true,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- true
- },
- { TIMESTAMP_5_05,
- TIMESTAMP_5_00,
- 3,
- false,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_5_04,
- TIMESTAMP_5_01,
- 3,
- true,
- { TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- true
- },
- { TIMESTAMP_5_04,
- TIMESTAMP_5_01,
- 3,
- false,
- { TIMESTAMP_5_03, TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_4_59,
- TIMESTAMP_5_05,
- 3,
- true,
- { TIMESTAMP_FIRST, TIMESTAMP_5_00, TIMESTAMP_5_02, 0 },
- true
- },
- { TIMESTAMP_4_59,
- TIMESTAMP_5_05,
- 3,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_07,
- 3,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_07,
- 3,
- false,
- { TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, 0 },
- true
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_UNSPECIFIED,
- 3,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_UNSPECIFIED,
- 3,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_UNSPECIFIED,
- 6,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, TIMESTAMP_5_06, TIMESTAMP_LAST, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_UNSPECIFIED,
- 6,
- false,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, TIMESTAMP_5_03, TIMESTAMP_5_05, TIMESTAMP_5_06, 0 },
- false
- },
- { TIMESTAMP_5_07,
- TIMESTAMP_UNSPECIFIED,
- 6,
- true,
- { TIMESTAMP_5_06, TIMESTAMP_LAST, 0 },
- false
- },
- { TIMESTAMP_5_07,
- TIMESTAMP_UNSPECIFIED,
- 6,
- false,
- { NODATA, 0 },
- false
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_5_06,
- 3,
- true,
- { TIMESTAMP_5_06,TIMESTAMP_5_05,TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_5_06,
- 3,
- false,
- { TIMESTAMP_5_06,TIMESTAMP_5_05,TIMESTAMP_5_03, 0 },
- true
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_5_06,
- 6,
- true,
- { TIMESTAMP_5_06,TIMESTAMP_5_05,TIMESTAMP_5_03,TIMESTAMP_5_02,TIMESTAMP_5_00,TIMESTAMP_FIRST, 0 },
- false
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_5_06,
- 6,
- false,
- { TIMESTAMP_5_06, TIMESTAMP_5_05, TIMESTAMP_5_03, TIMESTAMP_5_02, TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_4_48,
- 6,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_FIRST, 0 },
- false
- },
- { TIMESTAMP_UNSPECIFIED,
- TIMESTAMP_4_48,
- 6,
- false,
- { NODATA, 0 },
- false
- },
- { TIMESTAMP_4_48,
- TIMESTAMP_4_48,
- 0,
- true,
- { TIMESTAMP_FIRST, TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_4_48,
- TIMESTAMP_4_48,
- 0,
- false,
- { NODATA, 0 },
- false
- },
- { TIMESTAMP_4_48,
- TIMESTAMP_4_48,
- 1,
- true,
- { TIMESTAMP_FIRST, 0 },
- true
- },
- { TIMESTAMP_4_48,
- TIMESTAMP_4_48,
- 1,
- false,
- { NODATA, 0 },
- false
- },
- { TIMESTAMP_4_48,
- TIMESTAMP_4_48,
- 2,
- true,
- { TIMESTAMP_FIRST,TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_00,
- 0,
- true,
- { TIMESTAMP_5_00,TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_00,
- 0,
- false,
- { TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_00,
- 1,
- true,
- { TIMESTAMP_5_00, 0 },
- true
- },
- { TIMESTAMP_5_00,
- TIMESTAMP_5_00,
- 1,
- false,
- { TIMESTAMP_5_00, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_01,
- 0,
- true,
- { TIMESTAMP_5_00, TIMESTAMP_5_02, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_01,
- 0,
- false,
- { NODATA, 0 },
- false
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_01,
- 1,
- true,
- { TIMESTAMP_5_00, 0 },
- true
- },
- { TIMESTAMP_5_01,
- TIMESTAMP_5_01,
- 1,
- false,
- { NODATA },
- false
- },
- {0,0,0,false,{ NODATA }, false} // last element
- };
- #endif /*UA_HISTORICAL_READ_TEST_DATA_H_*/
|