# ELT CII MAL (Version 5.0.0)

## Features and Fixes

### CII Logger Names
  (ECII-1011)

  All logger names of CII were changed to be systematic and hierarchical,
  e.g. to enable debug logs for MAL OPCUA, use: `log4cplus.loggers.cii.mal.opcua=DEBUG`

  The list of new names can be found at:
    https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#adjust-cii-log-levels-log


### MAL

  - Fix: bad_function_call core dump. Tentative fix, to be confirmed (ELSV-963)
  - Fix: segfault in Python MAL (ECII-1179)
  - DDS ICD strings are no longer automatically limited to 255 chars (ECII-1037, ECII-1024)

#### ZPB Python MAL API no longer applies opaqueness to arrays of structs
(ECII-1050)

We are no longer generating "holder" classes to represent arrays

Example:

For an ICD like this:
```
  <struct name="MyStruct">
    <member name="val" type="boolean"/>
  </struct>

  <interface name="MyInterface">
    <method name="Reverse"
       returnType="nonBasic" nonBasicReturnTypeName="MyStruct" arrayDimensions="[3]">
      <argument name="args"
                type="nonBasic"  nonBasicTypeName="MyStruct" arrayDimensions="[3]"/>
    </method>
  </interface>
```

CII 4 generated the following types:
 - MyStruct
 - VectorMyStruct

which were used like this:
```
  mystruct1 = mal.createDataEntity(MyStruct); mystruct1.setVal(True)
  mystruct2 = mal.createDataEntity(MyStruct); mystruct2.setVal(False)

  mystructs = VectorMyStruct()
  mystructs.append(mystruct1)
  mystructs.append(mystruct2)

  returnval = myinterface.Reverse (mystructs)
  isinstance (returnval, list)   # False, it is a VectorMyStruct
  print (returnval[0].getVal())  # False
  print (returnval[1].getVal())  # True
```

CII 5 generates only:
 - MyStruct

and otherwise uses native python lists:
```
  mystruct1 = mal.createDataEntity(MyStruct); mystruct1.setVal(True)
  mystruct2 = mal.createDataEntity(MyStruct); mystruct2.setVal(False)

  mystructs = []   # <--- use plain python list
  mystructs.append(mystruct1)
  mystructs.append(mystruct2)

  returnval = myinterface.Reverse (mystructs)
  isinstance (returnval, list)   # True
  print (returnval[0].getVal())  # False
  print (returnval[1].getVal())  # True
```

#### Python MAL QoS lists
We now use plain lists instead of a custom list type.

```
    THREE_SECONDS = datetime.timedelta(0, 3)
    qos1 = elt.pymal.rr.qos.ConnectionTime(THREE_SECONDS)
    qos2 = elt.pymal.rr.qos.ReplyTime(THREE_SECONDS)

    qoslist = elt.pymal.RrQoSlist (qos1, qos2)  <-- no longer accepted by getClient
    qoslist = [ qos1, qos2 ]                    <-- use this instead

    with factory.getClient(uri,
                           RobotControlSync,
                           qos=qoslist) as robot:
```


### MAL General
[RC 2]

  - do not hinder use of C++23 in downstream projects (ECII-1141)
  - be compatible with future boost asio versions (ECII-1184)
  - version macro for MAL is available from MAL main header (ECII-1201)

### MAL General
[RC 3]

  - MAL is now running on FastDDS 3 (ECII-1118)



## General

  - MAL internal clean-ups (1072, 1152, 1155, 1159, 1162)
  - SRV internal clean-up (967, 972, 1132, 1133, 1136, 1154, 1163, 1168, 1180, 1181, 1182, 1200)


## Knowledge Base

  - Getting More Logs [MAL Log] 
    https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#getting-more-logs-mal-log

  - Less or More Logs [OLDB Log]
    https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#less-or-more-logs-oldb-log

  - Adjust CII Log Levels [Log]
    https://gitlab.eso.org/ecos/eltsw-docs/-/wikis/KnowledgeBase/CII#adjust-cii-log-levels-log

