Add new message types for A1 27/1927/1
authorE. Scott Daniels <daniels@research.att.com>
Wed, 13 Nov 2019 15:02:37 +0000 (10:02 -0500)
committerE. Scott Daniels <daniels@research.att.com>
Wed, 4 Dec 2019 14:18:20 +0000 (09:18 -0500)
A small vetting script was also added to help verify that
message types and constant names are not duplicated in the
header file.

Signed-off-by: E. Scott Daniels <daniels@research.att.com>
Change-Id: Ia7577842d94afd413665e84f248f860afa199045

CHANGES
CMakeLists.txt
src/rmr/common/include/RIC_message_types.h
src/rmr/common/include/vet_mtypes.ksh [new file with mode: 0755]

diff --git a/CHANGES b/CHANGES
index 3263a4c..87fbddc 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,10 +6,18 @@ and/or changes are not mentioned here; see the commit messages.
        Fix bug in payload reallocation function; correct length of payload
        was not always copied.
 
+2019 November 13; version 1.12.1
+       New message type constants added to support A1.
+
 2019 November 4; version 1.11.0
        Version bump to move away from the 1.10.* to distinguish between
        release A and the trial.
 
+2019 November 7; version 1.12.0
+       Version cut to support continued development for next release
+       preserving the 1.11.* versions for release 1 (Amber) and 
+       related fixes.
+
 2019 October 31; version 1.10.2
        Provide the means to increase the payload size of a received message
        without losing the data needed to use the rmr_rts_msg() funciton.
index 178b64b..d2e5b13 100644 (file)
@@ -36,7 +36,7 @@ cmake_minimum_required( VERSION 3.5 )
 
 set( major_version "1" )               # should be automatically populated from git tag later, but until CI process sets a tag we use this
 set( minor_version "12" )
-set( patch_level "0" )
+set( patch_level "1" )
 
 set( install_root "${CMAKE_INSTALL_PREFIX}" )
 set( install_inc "include/rmr" )
index 0e78dcd..aeb360e 100644 (file)
 #define DC_ADM_GET_POLICY                      20002
 #define DC_ADM_GET_POLICY_ACK          20003
 
+#define A1_POLICY_REQ                          20010
+#define A1_POLICY_RESP                         20011
+#define A1_POLICY_QUERY                                20012
+
+
 
 
 // ---- these are old (release 0) definitions and should not be used ------
diff --git a/src/rmr/common/include/vet_mtypes.ksh b/src/rmr/common/include/vet_mtypes.ksh
new file mode 100755 (executable)
index 0000000..c4e1b82
--- /dev/null
@@ -0,0 +1,67 @@
+#!/usr/bin/env ksh
+
+#==================================================================================
+#        Copyright (c) 2019 Nokia
+#        Copyright (c) 2018-2019 AT&T Intellectual Property.
+#
+#   Licensed under the Apache License, Version 2.0 (the "License");
+#   you may not use this file except in compliance with the License.
+#   You may obtain a copy of the License at
+#
+#       http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+#==================================================================================
+
+
+# This provides a quick sanity check on the message types in
+# the header file. The check is only to ensure that there are
+# no duplicate constant names or values for any #define in the file.
+#
+# By default RIC_message_types.h is parsed, but it will accept the 
+# filename as the first positional parameter on the command line should
+# it be necessary.
+#
+# The script exits with a 0 return code if all is good, 1 to indicate errors.
+#
+# CAUTION:  this breaks if any define is more than a simple key/value
+#      pair in the header file.
+
+awk '
+       /#define/ { 
+               vcount[$NF]++; 
+               ncount[$2]++;
+               next
+       } 
+
+       END { 
+               vgood = 0
+               ngood = 0
+               bad = 0
+
+               for( x in vcount ) { 
+                       if( vcount[x] != 1 ) { 
+                               printf( "duplicate value? %s\n", x ); 
+                               bad++ 
+                       } else { 
+                               vgood++ 
+                       } 
+               } 
+
+               for( x in ncount ) { 
+                       if( ncount[x] != 1 ) { 
+                               printf( "duplicate name? %s\n", x ); 
+                               bad++ 
+                       } else { 
+                               ngood++ 
+                       } 
+               } 
+
+               printf( "good values=%d good names=%d  bad things=%d\n", vgood, ngood, bad ) 
+
+               exit( !! bad )
+       }' ${1:-RIC_message_types.h}