2590 IntItemNode* intNode = 0;
2591 float currentDeadband = 0;
2594 if ((*issueParam).size <= 0) {
2595 (*issueParam).size = 0;
2597 "FeeServer command for getting dead band contained invalid parameter.",
2599 return FEE_INVALID_PARAM;
2602 nameLength = (*issueParam).size;
2603 itemName = (
char*)
malloc(nameLength + 1);
2604 if (itemName == 0) {
2605 (*issueParam).size = 0;
2606 return FEE_INSUFFICIENT_MEMORY;
2609 memcpy(itemName, (*issueParam).command, nameLength);
2610 itemName[nameLength] = 0;
2618 if ((node == 0) && (intNode == 0)) {
2620 msg[
sprintf(msg,
"Item %s not found in list.", itemName)] = 0;
2623 printf(
"Item %s not found in list.\n", itemName);
2628 (*issueParam).size = 0;
2630 "FeeServer command for getting dead band contained invalid parameter.",
2632 return FEE_INVALID_PARAM;
2634 (*issueParam).result = (
char*)
malloc(
sizeof(
float) + nameLength);
2635 if ((*issueParam).result == 0) {
2636 (*issueParam).size = 0;
2637 return FEE_INSUFFICIENT_MEMORY;
2642 currentDeadband = node->threshold * 2.0;
2644 currentDeadband = intNode->threshold * 2.0;
2647 memcpy((*issueParam).result, ¤tDeadband,
sizeof(
float));
2648 memcpy((*issueParam).result +
sizeof(
float), itemName, nameLength);
2649 (*issueParam).size =
sizeof(float) + nameLength;
2651 printf(
"Current deadband on item %s is %f.\n", itemName, currentDeadband);
2654 msg[
sprintf(msg,
"Current deadband for item %s is %f.", itemName,
2655 currentDeadband)] = 0;
ItemNode * findItem(char *name)
void createLogMessage(unsigned int type, char *description, char *origin)
IntItemNode * findIntItem(char *name)
sprintf(name1,"NewService%d", i)