uCosminexus Service Platform, Basic Development Guide

[Contents][Glossary][Index][Back][Next]

6.5.12 Using shift operation

Execute shift function by considering input value as hexadecimal character string. Shift operation, obtains and returns the result of shift operation specified in shift volume, shift direction and shift type, from child bits, equal to the size specified in output size. If the input value is other than hexadecimal character string, the error value (NaN) is returned. If input value exceeds 64 bit, round the bits more than 64 bits.

Process the shift operation function, with Big Endian.

Organization of this subsection
(1) Function used
(2) Setting procedure
(3) Execution example

(1) Function used

To execute Shift operation, use Shift operation function. Following figure shows the usage example.

Figure 6-13 FigureUsage example of Shift operation function

[Figure]

(2) Setting procedure

Procedure for setting Shift operation is as follows:

  1. Select Shift operation function (shift) from pallet and deploy to the mapping viewer.
  2. Set the mapping line.
  3. Display Shift operation dialog with either of the following methods.
    • Right click Shift operation function and select Settings.
    • Double click the Shift operation function.
    Shift operation dialog is displayed.
    For details on Shift operation dialog see "1.6.27 Shift operation dialog" in "Service Platform Reference Guide".
  4. To specify input value of shift operation in Input click Select node button.
    Node selection dialog is displayed.
  5. Specify node set, which is input value.
    Input value of shift operation is set in Input.
  6. When you want to execute mapping only when you set conditions in input value specified in Input and that condition is fulfilled, click Specify node conditions button.
    Specify node conditions dialog is displayed.
    For details on how to specify node conditions, see "6.7 Specifying Node Conditions". For details on Specify node conditions dialog, see "1.6.9 Set Node Condition Dialog" in "Service Platform Reference Guide".
  7. When you want to specify Shift operation target function in Input, click Select function button.
    Function selection dialog is displayed.
    For details on Function selection dialog, see "1.6.7 Select function dialog" in "Service Platform Reference Guide".
  8. Specify shift volume.
  9. Specify output size.
  10. Specify shift direction.
  11. Specify shift types.
  12. Click OK button.

(3) Execution example

Following table describes execution example:

Input#1 Shift volume Output size Shift direction Shift type Output result#1#2#3
76(0111 0110) 3 8 Left Calculation b0(1011 0000)
Right Calculation 0e(0000 1110)
Right Logic 0e(0000 1110)
89(1000 1001) Left Calculation 48(0100 1000)
Right Calculation f1(1111 0001)
Right Logic 11(0001 0001)
76(0111 0110) 2 6 Left Calculation 18(0001 1000) [d8(1101 1000)]
Right Calculation 1d(0001 1101) [1d(0001 1101)]
Right Logic 1d(0001 1101) [1d(0001 1101)]
89(1000 1001) Left Calculation 24(0010 0100) [24(0010 0100)]
Right Calculation 22(0010 0010) [e2(1110 0010)]
Right Logic 22(0010 0010) [22(0010 0010)]

Note#1
Contents of ( ) are decimal integer character string expression.

Note#2
Contents of [ ] is value before rounding up with output bits count.

Note#3
Bold letters are supplementary bits.