Definition at line 1740 of file feeserver.c.
References ack_service(), cleanUp(), command_handler(), createHeader(), createLogMessage(), dis_add_cmnd, dis_add_service, dis_remove_service, dis_start_serving, Memory::free(), Memory::malloc(), provideUpdateRate(), sprintf(), startLogWatchDogThread(), and startMonitorThread().
Referenced by EventBuilderWrapper::applyCalib(), DrsCalibrate::ApplyCh(), Compress(), createBenchmark(), Decompress(), FactGui::DisplayEventData(), initialize(), main(), UIConnector::on_autoScaleColor_clicked(), Queue< pair< Time, GUI_STAT > >::Queue(), AutoScheduler< T >::Schedule(), MyTimer::timerHandler(), Tools::Trim(), FitsFile::WriteData(), DataWriteFits2::WriteFooter(), DataWriteFits::WriteFooter(), and FitsFile::WriteKeyNT().
1741 int nRet = FEE_UNKNOWN_RETVAL;
1742 char* serviceName = 0;
1743 char* messageName = 0;
1744 char* commandName = 0;
1745 char msgStructure[50];
1747 if (state == COLLECTING) {
1750 if (serviceName == 0) {
1753 printf(
"no memory available while trying to create ACK channel!\n");
1776 if (messageName == 0) {
1779 printf(
"no memory available while trying to create message channel!\n");
1789 msgStructure[
sprintf(msgStructure,
"I:1;C:%d;C:%d;C:%d;C:%d",
1790 MSG_DETECTOR_SIZE, MSG_SOURCE_SIZE, MSG_DESCRIPTION_SIZE,
1791 MSG_DATE_SIZE)] = 0;
1794 sizeof(
unsigned int) + MSG_DETECTOR_SIZE + MSG_SOURCE_SIZE +
1795 MSG_DESCRIPTION_SIZE + MSG_DATE_SIZE, 0, 0);
1800 if (commandName == 0) {
1803 printf(
"no memory available while trying to create CMD channel!\n");
1820 if (initState == FEE_OK) {
1824 if (nRet != FEE_OK) {
1826 printf(
"Could NOT start monitor thread, error: %d\n", nRet);
1830 "Unable to start monitor thread on FeeServer.", 0);
1836 "FeeServer started correctly, including monitor thread.", 0);
1839 state = ERROR_STATE;
1841 "Initialisation of ControlEngine failed. FeeServer is running in ERROR state (without CE).",
1848 if (nRet != FEE_OK) {
1850 printf(
"Could NOT start log watch dog thread, error: %d; FeeServer will run without it.\n",
1855 "Can not start LogWatchDog thread (filters replicated MSGs). Uncritical error - running without it.",
#define dis_remove_service
static MessageStruct message
void command_handler(int *tag, char *address, int *size)
char * createHeader(unsigned int id, short errorCode, bool huffmanFlag, bool checksumFlag, int checksum)
static unsigned int serviceACKID
static int serverNameLength
void createLogMessage(unsigned int type, char *description, char *origin)
void ack_service(int *tag, char **address, int *size)
int startLogWatchDogThread()
#define dis_start_serving
static unsigned int commandID
sprintf(name1,"NewService%d", i)
static unsigned int messageServiceID