| 40 | # Handlers |
| 41 | ############################################################################### |
| 42 | class ArraysTestServiceHandler(IPointersService): |
| 43 | def sendReceivedInt32(self, arrayNumbers): |
| 44 | print('sendReceivedInt32 service reached\r\n=============') |
| 45 | sys.stdout.flush() |
| 46 | sendArrays = [] |
| 47 | for y in range(12): |
| 48 | # sendArrays[y] = arrayNumbers[y] |
| 49 | sendArrays.append(arrayNumbers[y]) |
| 50 | return sendArrays |
| 51 | |
| 52 | def sendReceived2Int32(self, arrayNumbers): |
| 53 | print('sendReceived2Int32 service reached\r\n=============') |
| 54 | sys.stdout.flush() |
| 55 | sendArrays = [[0 for a in range(10)] for b in range(12)] |
| 56 | for y in range(12): |
| 57 | for z in range(10): |
| 58 | sendArrays[y][z] = arrayNumbers[y][z] |
| 59 | return sendArrays |
| 60 | |
| 61 | def sendReceivedString(self, arrayStrings): |
| 62 | print('sendReceivedString service reached\r\n=============') |
| 63 | sys.stdout.flush() |
| 64 | sendArrays = ["" for a in range(12)] |
| 65 | for y in range(12): |
| 66 | sendArrays[y] = arrayStrings[y] |
| 67 | return sendArrays |
| 68 | |
| 69 | def sendReceived2String(self, arrayStrings): |
| 70 | print('sendReceived2String service reached\r\n=============') |
| 71 | sys.stdout.flush() |
| 72 | sendArrays = [["" for a in range(5)] for b in range(3)] |
| 73 | for y in range(3): |
| 74 | for z in range(5): |
| 75 | sendArrays[y][z] = arrayStrings[y][z] |
| 76 | return sendArrays |
| 77 | |
| 78 | def sendReceivedEnum(self, arrayEnums): |
| 79 | print('sendReceivedEnum service reached\r\n=============') |
| 80 | sys.stdout.flush() |
| 81 | sendArrays = [] |
| 82 | for y in range(3): |
| 83 | sendArrays.append(arrayEnums[y]) |
| 84 | return sendArrays |
| 85 | |
| 86 | def sendReceived2Enum(self, arrayEnums): |
| 87 | print('sendReceived2Enum service reached\r\n=============') |
| 88 | sys.stdout.flush() |
| 89 | sendArrays = [[0 for a in range(3)] for b in range(3)] |
| 90 | for y in range(3): |
| 91 | for z in range(3): |
| 92 | sendArrays[y][z] = arrayEnums[y][z] |
| 93 | return sendArrays |
| 94 | |
| 95 | def sendReceivedList(self, arrayLists): |
| 96 | print('sendReceivedList service reached\r\n=============') |
| 97 | sys.stdout.flush() |
| 98 | sendArrays = [] |
| 99 | for y in range(2): |