| 97 | } |
| 98 | |
| 99 | int cDataReader::myRegisterInstance(int *runMe) |
| 100 | { |
| 101 | const char * tn = getComponentInstanceType(dmInstName); |
| 102 | if (tn == NULL) { |
| 103 | SMILE_IWRN(4,"cannot yet find dataMemory component '%s'!",dmInstName); |
| 104 | return 0; |
| 105 | } |
| 106 | if (!strcmp(tn, COMPONENT_NAME_CDATAMEMORY)) { |
| 107 | dm = (cDataMemory *)getComponentInstance(dmInstName); |
| 108 | if (dm == NULL) { |
| 109 | SMILE_IERR(1,"dataMemory instance dmInstance='%s' was not found in componentManager!",dmInstName); |
| 110 | // COMP_ERR("failed to register!"); |
| 111 | return 0; |
| 112 | } |
| 113 | } else { // not datamemory type.. |
| 114 | if (dm == NULL) { |
| 115 | SMILE_IERR(1,"dmInstance='%s' -> not of type %s (dataMemory)!",dmInstName,COMPONENT_NAME_CDATAMEMORY); |
| 116 | // COMP_ERR("failed to register!"); |
| 117 | return 0; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | int i; |
| 122 | for (i=0; i<nLevels; i++) { |
| 123 | dm->registerReadRequest(dmLevel[i],getInstName()); |
| 124 | } |
| 125 | |
| 126 | return 1; |
| 127 | } |
| 128 | |
| 129 | int cDataReader::myConfigureInstance() |
| 130 | { |
nothing calls this directly
no test coverage detected