コード例 #1
0
ファイル: mms_domain.c プロジェクト: rwl/libiec61850
MmsNamedVariableList
MmsDomain_getNamedVariableList(MmsDomain* self, char* variableListName)
{
    MmsNamedVariableList variableList = NULL;

    LinkedList element = LinkedList_getNext(self->namedVariableLists);

    while (element != NULL) {
        MmsNamedVariableList varList = (MmsNamedVariableList) element->data;

        if (strcmp(MmsNamedVariableList_getName(varList), variableListName) == 0) {
            variableList = varList;
            break;
        }

        element = LinkedList_getNext(element);
    }

    return variableList;
}
コード例 #2
0
MmsNamedVariableList
MmsServerConnection_getNamedVariableList(MmsServerConnection* self, char* variableListName)
{
	//TODO remove code duplication - similar to MmsDomain_getNamedVariableList !
	MmsNamedVariableList variableList = NULL;

	LinkedList element = LinkedList_getNext(self->namedVariableLists);

	while (element != NULL) {
		MmsNamedVariableList varList = (MmsNamedVariableList) element->data;

		if (strcmp(MmsNamedVariableList_getName(varList), variableListName) == 0) {
			variableList = varList;
			break;
		}

		element = LinkedList_getNext(element);
	}

	return variableList;
}