DX NetOps

 View Only

EventProcedure Network_Address variable type

  • 1.  EventProcedure Network_Address variable type

    Posted 13 days ago
    Edited by Raphael Franck (DB Systel) 13 days ago

    Hi,

    we're trying to create a somewaht enhanced Spectrum event procedure as follows:

    The originating event has some event variables including an ipaddress as number 6 delivered through a trap using less-than-optimal value type OctectString.

    This event variable 6 is used to find all models having the same value of Network_Address.

    For each model found, a new event should be raised passing the complete event variable list.

    Despite definitely having models on the landscape with matching Network_Address values, the GetModelsByAttrValue does not find any models, hence the ForEach loop is run zero times. We tried various combinations of ToString, ToIpAddr, ToObjectId and no typecasting but still suspect some issue with the variable type.

    0xffffffff E 20 P "ForEach( \
                           GetModelsByAttrValue( {H 0x12d7f}, ToIpAddr( ToString( GetEventVariable( {U 6} ) ) ) ), \
                           { Variable X }, \
                           { Variable retList }, \
                           CreateList(), \
                           CreateEventWithVariables( { Variable X }, { H 0xfffffffe }, GetEventVariableList() ) \
                   ) "

    When printing the variable value using DebugValue dand ifferent typecasts we get the following:

    > raw value
    DEBUG: PROCEDURE:
    Octet string value: 31.39.32.2E.31.36.38.2E.32.33.2E.34
    DEBUG: End of debug output

    > ToObjectId
    DEBUG: PROCEDURE:
    Object ID value: 192.168.23.4
    DEBUG: End of debug output

    >ToString
    DEBUG: PROCEDURE:
    Text String value: 192.168.23.4
    DEBUG: End of debug output

    >ToIpAddr
    DEBUG: PROCEDURE:
    Object ID value: 49.57.50.46.49.54.56.46.50.51.46.52
    DEBUG: End of debug output

    >ToIpAddr( ToString() )

    DEBUG: PROCEDURE:
    Object ID value: 192.168.23.4
    DEBUG: End of debug output

    When just quering the attribute Network_Address (0x12d7f) of an existing model using ReadAttribute(), we're getting the data type "Object ID value" printed by DebugValue().

    Any hints on what we're missing?



    -------------------------------------------