| 128 | } |
| 129 | |
| 130 | int cDataWriter::myRegisterInstance(int *runMe) |
| 131 | { |
| 132 | const char * tn = getComponentInstanceType(dmInstName); |
| 133 | if (tn == NULL) { |
| 134 | SMILE_IWRN(4,"cannot yet find dataMemory component '%s'!",dmInstName); |
| 135 | return 0; |
| 136 | } |
| 137 | if (!strcmp(tn, COMPONENT_NAME_CDATAMEMORY)) { |
| 138 | dm = (cDataMemory *)getComponentInstance(dmInstName); |
| 139 | if (dm == NULL) { |
| 140 | SMILE_IERR(1,"dataMemory instance dmInstance='%s' was not found in componentManager!",dmInstName); |
| 141 | // COMP_ERR("failed to register!"); |
| 142 | return 0; |
| 143 | } |
| 144 | } else { // not datamemory type.. |
| 145 | if (dm == NULL) { |
| 146 | SMILE_IERR(1,"dmInstance='%s' -> not of type %s (dataMemory)!",dmInstName,COMPONENT_NAME_CDATAMEMORY); |
| 147 | // COMP_ERR("failed to register!"); |
| 148 | return 0; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | dm->registerWriteRequest(dmLevel,getInstName()); |
| 153 | |
| 154 | return 1; |
| 155 | } |
| 156 | |
| 157 | /* create and configure writer level */ |
| 158 | // level config can be set: |
nothing calls this directly
no test coverage detected