#include <cms.hh>
Inheritance diagram for CMS:


|
|
Definition at line 168 of file cms.cc. 00169 {
00170 /* Print a message if the PRINT_CMS_CONSTUCTORS */
00171 /* member of the print flags is set. */
00172 rcs_print_debug (PRINT_CMS_CONSTRUCTORS, "new CMS (%d)", s);
00173
00174 /* Init string buffers */
00175 memset (BufferName, 0, CMS_CONFIG_LINELEN);
00176 memset (BufferHost, 0, CMS_CONFIG_LINELEN);
00177 memset (ProcessName, 0, CMS_CONFIG_LINELEN);
00178 memset (BufferLine, 0, CMS_CONFIG_LINELEN);
00179 memset (ProcessLine, 0, CMS_CONFIG_LINELEN);
00180 memset (ProcessHost, 0, CMS_CONFIG_LINELEN);
00181 memset (buflineupper, 0, CMS_CONFIG_LINELEN);
00182 memset (proclineupper, 0, CMS_CONFIG_LINELEN);
00183 memset (PermissionString, 0, CMS_CONFIG_LINELEN);
00184
00185 /* save constructor args */
00186 size = s;
00187 force_raw = 0;
00188 neutral = 0;
00189 isserver = 0;
00190 last_im = CMS_NOT_A_MODE;
00191 min_compatible_version = 0;
00192 confirm_write = 0;
00193 disable_final_write_raw_for_dma = 0;
00194 subdiv_data = 0;
00195 enable_diagnostics = 0;
00196 dpi = NULL;
00197 di = NULL;
00198 skip_area = 0;
00199 half_offset = s / 2;
00200 half_size = s / 2;
00201 fast_mode = 0;
00202 disable_diag_store = 0;
00203 diag_offset = 0;
00204
00205
00206 /* Initailize some variables. */
00207 read_permission_flag = 0; /* Allow both read and write by default. */
00208 write_permission_flag = 0;
00209 queuing_enabled = 0;
00210 fatal_error_occurred = 0;
00211 write_just_completed = 0;
00212 neutral_encoding_method = CMS_XDR_ENCODING;
00213 sizeof_message_header = 0;
00214 blocking_timeout = 0;
00215 total_subdivisions = 1;
00216 subdiv_size = size;
00217 current_subdivision = 0;
00218 enc_max_size = s;
00219 max_encoded_message_size = s;
00220 last_id_side0 = 0;
00221 last_id_side1 = 0;
00222 handle_to_global_data = NULL;
00223 dummy_handle = (PHYSMEM_HANDLE *) NULL; /* Set pointers to NULL */
00224 /* so we'll know whether it really */
00225 /* points to something */
00226
00227 delete_totally = 0; /* If this object is deleted only do */
00228 /* normal delete instead of deleting totally. */
00229
00230 mode = CMS_NOT_A_MODE; /* Force user to set the mode before using. */
00231
00232 open (); /* Allocate memory and intialize XDR streams */
00233 }
|
|
||||||||||||||||
|
Definition at line 244 of file cms.cc. 00245 {
00246 char *word[32]; /* Array of pointers to strings. */
00247 char *buffer_type_name; /* pointer to buffer type name from bufline */
00248 char *proc_type_name; /* pointer to process type from procline */
00249 int i;
00250 sizeof_message_header = 0;
00251 min_compatible_version = 0;
00252 force_raw = 0;
00253 confirm_write = 0;
00254 disable_final_write_raw_for_dma = 0;
00255 /* Init string buffers */
00256 memset (BufferName, 0, CMS_CONFIG_LINELEN);
00257 memset (BufferHost, 0, CMS_CONFIG_LINELEN);
00258 memset (ProcessName, 0, CMS_CONFIG_LINELEN);
00259 memset (BufferLine, 0, CMS_CONFIG_LINELEN);
00260 memset (ProcessLine, 0, CMS_CONFIG_LINELEN);
00261 memset (ProcessHost, 0, CMS_CONFIG_LINELEN);
00262 memset (buflineupper, 0, CMS_CONFIG_LINELEN);
00263 memset (proclineupper, 0, CMS_CONFIG_LINELEN);
00264 memset (PermissionString, 0, CMS_CONFIG_LINELEN);
00265
00266 /* Initailize some variables. */
00267 read_permission_flag = 0; /* Allow both read and write by default. */
00268 write_permission_flag = 0;
00269 queuing_enabled = 0;
00270 fatal_error_occurred = 0;
00271 write_just_completed = 0;
00272 neutral_encoding_method = CMS_XDR_ENCODING;
00273 sizeof_message_header = 0;
00274 blocking_timeout = 0;
00275 min_compatible_version = 0;
00276 enc_max_size = -1;
00277 max_encoded_message_size = 0;
00278 enable_diagnostics = 0;
00279 dpi = NULL;
00280 di = NULL;
00281 disable_diag_store = 0;
00282 diag_offset = 0;
00283 use_autokey_for_connection_number = 0;
00284
00285 if ((NULL == bufline) || (NULL == procline))
00286 {
00287 rcs_print_error ("CMS: Pointer to bufline or procline is NULL.\n");
00288 return;
00289 }
00290
00291 convert2upper (buflineupper, bufline, CMS_CONFIG_LINELEN);
00292 convert2upper (proclineupper, procline, CMS_CONFIG_LINELEN);
00293
00294 is_phantom = 0;
00295 max_message_size = 0;
00296 using_external_encoded_data = 0;
00297 in_buffer_id = 0;
00298 last_id_side0 = 0;
00299 last_id_side1 = 0;
00300 delete_totally = 0;
00301 queuing_enabled = 0;
00302 split_buffer = 0;
00303 fatal_error_occurred = 0;
00304 consecutive_timeouts = 0;
00305 write_just_completed = 0;
00306 pointer_check_disabled = 0;
00307 blocking_timeout = 0;
00308 last_im = CMS_NOT_A_MODE;
00309 total_subdivisions = 1;
00310 size = 0;
00311 subdiv_size = 0;
00312 current_subdivision = 0;
00313 max_encoded_message_size = 0;
00314 skip_area = 0;
00315 half_offset = 0;
00316 half_size = 0;
00317 fast_mode = 0;
00318 last_id_side0 = 0;
00319 last_id_side1 = 0;
00320 handle_to_global_data = NULL;
00321
00322
00323 dummy_handle = (PHYSMEM_HANDLE *) NULL;
00324 remote_port_type = CMS_NO_REMOTE_PORT_TYPE;
00325 for (i = 0; i < 10; i++)
00326 {
00327 word[i] = (char *) NULL;
00328 }
00329
00330 /* Store the bufline and procline for debugging later. */
00331 strcpy (BufferLine, bufline);
00332 strcpy (ProcessLine, procline);
00333
00334 /* Get parameters from the buffer's line in the config file. */
00335 if (separate_words (word, 9, bufline) != 9)
00336 {
00337 rcs_print_error ("CMS: Error in buffer line from config file.\n");
00338 rcs_print_error ("%s\n", bufline);
00339 status = CMS_CONFIG_ERROR;
00340 return;
00341 }
00342
00343 /* Use the words from the buffer line to initialize some class variables. */
00344 strcpy (BufferName, word[1]);
00345 rcs_print_debug (PRINT_CMS_CONSTRUCTORS, "new CMS (%s)\n", BufferName);
00346
00347 /* Clear errno so we can determine if all of the parameters in the */
00348 /* buffer line were in an acceptable form. */
00349 #ifndef UNDER_CE
00350 if (errno == ERANGE)
00351 {
00352 errno = 0;
00353 }
00354 #endif
00355 char *realname = cms_check_for_host_alias (word[3]);
00356 if (realname == NULL)
00357 {
00358 strcpy (BufferHost, word[3]);
00359 }
00360 else
00361 {
00362 strcpy (BufferHost, realname);
00363 }
00364
00365 buffer_type_name = word[2];
00366
00367
00368 /* strtol should allow us to use the C syntax for specifying the radix of */
00369 /* the numbers in the configuration file. */
00370 /* (i.e. 0x???? for hexidecimal, 0??? for octal and ???? for decimal.) */
00371 #ifndef UNDER_CE
00372 size = (long) strtol (word[4], (char **) NULL, 0);
00373 neutral = (int) strtol (word[5], (char **) NULL, 0);
00374 rpc_program_number = strtol (word[6], (char **) NULL, 0);
00375 buffer_number = strtol (word[7], (char **) NULL, 0);
00376 total_connections = strtol (word[8], (char **) NULL, 0);
00377 #else
00378 size = (long) atol (word[4]);
00379 neutral = (int) atol (word[5]);
00380 rpc_program_number = atol (word[6]);
00381 buffer_number = atol (word[7]);
00382 total_connections = atol (word[8]);
00383 #endif
00384
00385 #ifndef UNDER_CE
00386 /* Check errno to see if all of the strtol's were sucessful. */
00387 if (ERANGE == errno)
00388 {
00389 rcs_print_error ("CMS: Error in buffer line from config file.\n");
00390 rcs_print_error ("%s\n", bufline);
00391 status = CMS_CONFIG_ERROR;
00392 return;
00393 }
00394 #endif
00395
00396 /* Determine the BufferType. */
00397 if (!strcmp (buffer_type_name, "SHMEM"))
00398 {
00399 BufferType = CMS_SHMEM_TYPE;
00400 }
00401 else if (!strcmp (buffer_type_name, "GLOBMEM"))
00402 {
00403 BufferType = CMS_GLOBMEM_TYPE;
00404 }
00405 else if (!strcmp (buffer_type_name, "BBDMEM"))
00406 {
00407 BufferType = CMS_BBDMEM_TYPE;
00408 }
00409 else if (!strcmp (buffer_type_name, "PHANTOM"))
00410 {
00411 BufferType = CMS_PHANTOM_BUFFER;
00412 is_phantom = 1;
00413 }
00414 else if (!strcmp (buffer_type_name, "LOCMEM"))
00415 {
00416 BufferType = CMS_LOCMEM_TYPE;
00417 }
00418 else if (!strcmp (buffer_type_name, "FILEMEM"))
00419 {
00420 BufferType = CMS_FILEMEM_TYPE;
00421 }
00422 else if (!strcmp (buffer_type_name, "RTLMEM"))
00423 {
00424 BufferType = CMS_RTLMEM_TYPE;
00425 }
00426 else
00427 {
00428 rcs_print_error ("CMS: invalid buffer type (%s)\n", buffer_type_name);
00429 status = CMS_CONFIG_ERROR;
00430 return;
00431 }
00432
00433 int num_words = separate_words (word, 32, buflineupper);
00434 if (num_words < 8)
00435 {
00436 rcs_print_error ("CMS: Error in buffer line from config file.\n");
00437 rcs_print_error ("%s\n", bufline);
00438 status = CMS_CONFIG_ERROR;
00439 return;
00440 }
00441 for (i = 8; i < num_words && i < 32; i++)
00442 {
00443 if (word[i] == NULL)
00444 {
00445 break;
00446 }
00447
00448 if (!strcmp (word[i], "QUEUE"))
00449 {
00450 queuing_enabled = 1;
00451 continue;
00452 }
00453
00454
00455 if (!strcmp (word[i], "DIAG"))
00456 {
00457 enable_diagnostics = 1;
00458 continue;
00459 }
00460
00461 if (!strcmp (word[i], "SPLIT"))
00462 {
00463 split_buffer = 1;
00464 continue;
00465 }
00466 if (!strcmp (word[i], "DISP"))
00467 {
00468 neutral_encoding_method = CMS_DISPLAY_ASCII_ENCODING;
00469 continue;
00470 }
00471 if (!strcmp (buflineupper, "ASCII"))
00472 {
00473 neutral_encoding_method = CMS_ASCII_ENCODING;
00474 continue;
00475 }
00476 if (!strcmp (buflineupper, "XDR"))
00477 {
00478 neutral_encoding_method = CMS_XDR_ENCODING;
00479 continue;
00480 }
00481
00482 char *port_string;
00483 if (NULL != (port_string = strstr (word[i], "STCP=")))
00484 {
00485 remote_port_type = CMS_STCP_REMOTE_PORT_TYPE;
00486 #ifndef UNDER_CE
00487 stcp_port_number =
00488 (int) strtol (port_string + 5, (char **) NULL, 0);
00489 #else
00490 rcs_print_error ("STCP not supported in Windows CE.\n");
00491 stcp_port_number = atoi (port_string + 5);
00492 #endif
00493 continue;
00494 }
00495 else if (NULL != (port_string = strstr (word[i], "TCP=")))
00496 {
00497 remote_port_type = CMS_TCP_REMOTE_PORT_TYPE;
00498 #ifndef UNDER_CE
00499 tcp_port_number = (int) strtol (port_string + 4, (char **) NULL, 0);
00500 #else
00501 tcp_port_number = atoi (port_string + 4);
00502 #endif
00503 continue;
00504 }
00505 else if (NULL != (port_string = strstr (word[i], "UDP=")))
00506 {
00507 remote_port_type = CMS_UDP_REMOTE_PORT_TYPE;
00508 #ifndef UNDER_CE
00509 udp_port_number = (int) strtol (port_string + 4, (char **) NULL, 0);
00510 #else
00511 udp_port_number = atoi (port_string + 4);
00512 #endif
00513 continue;
00514 }
00515
00516 char *version_string;
00517 if (NULL != (version_string = strstr (word[i], "VERSION=")))
00518 {
00519 #ifndef UNDER_CE
00520 min_compatible_version =
00521 strtod (version_string + 8, (char **) NULL);
00522 #else
00523 min_compatible_version = RCS_CE_ATOF (version_string + 8);
00524 #endif
00525 continue;
00526 }
00527
00528 char *subdiv_string;
00529 if (NULL != (subdiv_string = strstr (word[i], "SUBDIV=")))
00530 {
00531 #ifndef UNDER_CE
00532 total_subdivisions = strtol (subdiv_string + 7, (char **) NULL, 0);
00533 #else
00534 total_subdivisions = atol (subdiv_string + 7);
00535 #endif
00536 subdiv_size = size / total_subdivisions;
00537 subdiv_size -= subdiv_size % 4;
00538 continue;
00539 }
00540
00541 char *enc_max_string;
00542 if (NULL != (enc_max_string = strstr (word[i], "ENC_MAX_SIZE=")))
00543 {
00544 #ifndef UNDER_CE
00545 enc_max_size = strtoul (enc_max_string + 13, (char **) NULL, 0);
00546 #else
00547 enc_max_size = atol (enc_max_string + 13);
00548 #endif
00549 continue;
00550 }
00551
00552 if (!strcmp (word[i], "CONFIRM_WRITE"))
00553 {
00554 confirm_write = 1;
00555 continue;
00556 }
00557 if (!strcmp (word[i], "FORCE_RAW"))
00558 {
00559 force_raw = 1;
00560 continue;
00561 }
00562 if (!strcmp (word[i], "AUTOCNUM"))
00563 {
00564 use_autokey_for_connection_number = 1;
00565 continue;
00566 }
00567 }
00568
00569 /* Get parameters from the process's line in the config file. */
00570 if (use_autokey_for_connection_number)
00571 {
00572 if (separate_words (word, 9, procline) != 9)
00573 {
00574 rcs_print_error
00575 ("CMS: Error parsing process line from config file.\n");
00576 rcs_print_error ("%s\n", procline);
00577 status = CMS_CONFIG_ERROR;
00578 return;
00579 }
00580 }
00581 else
00582 {
00583 if (separate_words (word, 10, procline) != 10)
00584 {
00585 rcs_print_error
00586 ("CMS: Error parsing process line from config file.\n");
00587 rcs_print_error ("%s\n", procline);
00588 status = CMS_CONFIG_ERROR;
00589 return;
00590 }
00591 }
00592 #ifndef UNDER_CE
00593 /* Clear errno so we can determine if all of the parameters in the */
00594 /* buffer line were in an acceptable form. */
00595 if (errno == ERANGE)
00596 {
00597 errno = 0;
00598 }
00599 #endif
00600
00601 strcpy (ProcessName, word[1]);
00602 strcpy (ProcessHost, word[4]);
00603
00604 #ifndef UNDER_CE
00605 /* Clear errno so we can determine if all of the parameters in the */
00606 /* buffer line were in an acceptable form. */
00607 if (errno == ERANGE)
00608 {
00609 errno = 0;
00610 }
00611 #endif
00612
00613 proc_type_name = word[3];
00614 strcpy (PermissionString, word[5]);
00615 spawn_server = atoi (word[6]);
00616
00617 /* Compute timeout. */
00618 if (!strcmp (word[7], "INF")) /* Never Time Out. */
00619 {
00620 timeout = -1;
00621 }
00622 else
00623 {
00624 #ifndef UNDER_CE
00625 timeout = strtod (word[7], (char **) NULL);
00626 #else
00627 timeout = RCS_CE_ATOF (word[7]);
00628 #endif
00629 }
00630
00631
00632 #ifndef UNDER_CE
00633 is_local_master = (int) atol (word[8]);
00634 #else
00635 is_local_master = (int) atol (word[8]);
00636 #endif
00637
00638 if (!use_autokey_for_connection_number)
00639 {
00640
00641 #ifndef UNDER_CE
00642 connection_number = atol (word[9]);
00643 #else
00644 connection_number = atol (word[9]);
00645 #endif
00646
00647 if (total_connections <= connection_number)
00648 {
00649 rcs_print_error
00650 ("CMS: connection number(%d) must be less than total connections (%d).\n",
00651 connection_number, total_connections);
00652 status = CMS_CONFIG_ERROR;
00653 return;
00654 }
00655 }
00656
00657
00658 #ifndef UNDER_CE
00659 /* Check errno to see if all of the strtol's were sucessful. */
00660 if (ERANGE == errno)
00661 {
00662 rcs_print_error ("CMS: Error in proc line from config file.\n");
00663 rcs_print_error ("%s\n", procline);
00664 status = CMS_CONFIG_ERROR;
00665 return;
00666 }
00667 #endif
00668
00669
00670 if (set_to_server < 0)
00671 {
00672 isserver = 0;
00673 }
00674 else if (set_to_server > 0)
00675 {
00676 isserver = 1;
00677 }
00678 else
00679 {
00680 isserver = (spawn_server == 1);
00681 }
00682
00683 /* Determine the ProcessType. */
00684 switch (cms_connection_mode)
00685 {
00686 case CMS_NORMAL_CONNECTION_MODE:
00687 if (!strcmp (proc_type_name, "REMOTE"))
00688 {
00689 ProcessType = CMS_REMOTE_TYPE;
00690 spawn_server = 0;
00691 }
00692 else if (!strcmp (proc_type_name, "LOCAL"))
00693 {
00694 ProcessType = CMS_LOCAL_TYPE;
00695 }
00696 else if (!strcmp (proc_type_name, "AUTO"))
00697 {
00698 if (hostname_matches_bufferline (BufferLine))
00699 {
00700 ProcessType = CMS_LOCAL_TYPE;
00701 }
00702 else
00703 {
00704 ProcessType = CMS_REMOTE_TYPE;
00705 spawn_server = 0;
00706 }
00707 }
00708 else if (!strcmp (proc_type_name, "PHANTOM"))
00709 {
00710 ProcessType = CMS_PHANTOM_USER;
00711 spawn_server = 0;
00712 is_phantom = 1;
00713 }
00714 else
00715 {
00716 rcs_print_error ("CMS: invalid process type (%s)/n",
00717 proc_type_name);
00718 status = CMS_CONFIG_ERROR;
00719 return;
00720 }
00721 break;
00722
00723 case CMS_FORCE_LOCAL_CONNECTION_MODE:
00724 ProcessType = CMS_LOCAL_TYPE;
00725 break;
00726
00727 case CMS_FORCE_REMOTE_CONNECTION_MODE:
00728 ProcessType = CMS_REMOTE_TYPE;
00729 break;
00730
00731
00732 }
00733
00734 /* Set flags to make sure ops section of config file is correct. */
00735 if (NULL != strchr (PermissionString, 'R'))
00736 {
00737 read_permission_flag = 1;
00738 }
00739 else
00740 {
00741 read_permission_flag = 0;
00742 }
00743
00744 if (NULL != strchr (PermissionString, 'W'))
00745 {
00746 write_permission_flag = 1;
00747 }
00748 else
00749 {
00750 write_permission_flag = 0;
00751 }
00752 if (isserver && BufferType != CMS_BBDMEM_TYPE)
00753 {
00754 read_permission_flag = 1;
00755 write_permission_flag = 1;
00756 }
00757
00758 mode = CMS_NOT_A_MODE; /* Make sure user sets the mode before using. */
00759
00760 // Search the end of the bufferline for key words.
00761
00762 if (NULL != strstr (ProcessLine, "serialPortDevName="))
00763 {
00764 remote_port_type = CMS_TTY_REMOTE_PORT_TYPE;
00765 }
00766 if (min_compatible_version < 3.44 && min_compatible_version > 0)
00767 {
00768 total_subdivisions = 1;
00769 }
00770 if (queuing_enabled && split_buffer)
00771 {
00772 rcs_print_error ("CMS: Can not split buffer with queuing enabled.\n");
00773 status = CMS_CONFIG_ERROR;
00774 return;
00775 }
00776 if (min_compatible_version > 3.39 || min_compatible_version <= 0.0)
00777 {
00778 if (neutral_encoding_method == CMS_ASCII_ENCODING)
00779 {
00780 neutral_encoding_method = CMS_DISPLAY_ASCII_ENCODING;
00781 }
00782 }
00783
00784 if (min_compatible_version <= 3.71 && min_compatible_version >= 1e-6)
00785 {
00786 enable_diagnostics = 0;
00787 }
00788
00789 open (); /* Allocate memory and intialize XDR streams */
00790 if (enable_diagnostics)
00791 {
00792 setup_diag_proc_info ();
00793 }
00794 }
|
|
|
Definition at line 1094 of file cms.cc. 01095 {
01096 rcs_print_debug (PRINT_CMS_DESTRUCTORS, "deleting CMS (%s)\n", BufferName);
01097
01098 if (NULL != updater)
01099 {
01100 delete updater;
01101 updater = (CMS_UPDATER *) NULL;
01102 }
01103
01104 /* Free the memory used for the local copy of the global buffer. */
01105 if (NULL != data && (!force_raw || !using_external_encoded_data))
01106 {
01107 rcs_print_debug (PRINT_CMS_DESTRUCTORS, "free( data = %X);\n", data);
01108 #ifdef sparcworks_sun4 /* free is defined as int free(char *)
01109 for this platform
01110 it should be void free(void *); */
01111 DEBUG_FREE ((char *) data);
01112 #else
01113 DEBUG_FREE (data);
01114 #endif
01115 data = NULL;
01116 if (force_raw)
01117 {
01118 encoded_data = NULL;
01119 }
01120 }
01121 number_of_cms_objects--;
01122
01123 if (NULL != dummy_handle)
01124 {
01125 delete dummy_handle;
01126 dummy_handle = (PHYSMEM_HANDLE *) NULL;
01127 }
01128 rcs_print_debug (PRINT_CMS_DESTRUCTORS, "Leaving ~CMS()\n");
01129 }
|
|
|
Definition at line 1993 of file cms.cc. 01994 {
01995 }
|
|
|
Definition at line 131 of file cms.cc. 00132 {
00133 if (size < sizeof (CMS))
00134 {
00135 rcs_print_error
00136 ("CMS::operator new -- The size requested %d is less than the mininimum size of CMS %d.\n",
00137 size, sizeof (CMS));
00138 rcs_print_error ("This could indicate a version mismatch problem.\n");
00139 size = sizeof (CMS);
00140 }
00141 void *space = (void *) DEBUG_MALLOC (size);
00142 if (NULL != space)
00143 {
00144 memset (space, 0, size);
00145 }
00146 rcs_print_debug (PRINT_CMS_CONSTRUCTORS, "%X = CMS::new(%d)\n", space,
00147 size);
00148 return space;
00149 }
|
|
|
Definition at line 153 of file cms.cc. 00154 {
00155 rcs_print_debug (PRINT_CMS_DESTRUCTORS, " CMS::delete(%X)\n", space);
00156 DEBUG_FREE (space);
00157 rcs_print_debug (PRINT_CMS_DESTRUCTORS, " CMS::delete successful.\n");
00158 }
|
|
|
Reimplemented in FILEMEM, RPCMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1218 of file cms.cc. 01219 {
01220 in_buffer_id = 0;
01221 last_id_side0 = 0;
01222 last_id_side1 = 0;
01223 status = CMS_STATUS_NOT_SET;
01224 internal_access_type = CMS_CLEAR_ACCESS;
01225 main_access (data);
01226 return (status);
01227 }
|
|
|
Reimplemented in FILEMEM, RPCMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1230 of file cms.cc. 01231 {
01232 internal_access_type = CMS_CHECK_IF_READ_ACCESS;
01233 status = CMS_STATUS_NOT_SET;
01234 main_access (data);
01235 return ((int) header.was_read);
01236 }
|
|
|
Definition at line 1999 of file cms.cc. 02000 {
02001 if (!enable_diagnostics)
02002 {
02003 return (0);
02004 }
02005
02006 internal_access_type = CMS_GET_MSG_COUNT_ACCESS;
02007 status = CMS_STATUS_NOT_SET;
02008 blocking_timeout = 0;
02009 main_access (data);
02010 return (header.write_id);
02011 }
|
|
|
Definition at line 1239 of file cms.cc. 01240 {
01241 return 1;
01242 }
|
|
|
Reimplemented in BBDMEM, FILEMEM, RPCMEM, RTLMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1244 of file cms.cc. 01245 {
01246 internal_access_type = CMS_READ_ACCESS;
01247 status = CMS_STATUS_NOT_SET;
01248 blocking_timeout = 0;
01249 main_access (data);
01250 return (status);
01251 }
|
|
|
Reimplemented in TCPMEM, TTYMEM, and UDPMEM. Definition at line 1253 of file cms.cc. 01254 {
01255 status = CMS_STATUS_NOT_SET;
01256 internal_access_type = CMS_READ_ACCESS;
01257 blocking_timeout = _blocking_timeout;
01258 main_access (data);
01259 return (status);
01260 }
|
|
|
Reimplemented in BBDMEM, FILEMEM, RPCMEM, RTLMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1272 of file cms.cc. 01273 {
01274 internal_access_type = CMS_PEEK_ACCESS;
01275 status = CMS_STATUS_NOT_SET;
01276 blocking_timeout = 0;
01277 main_access (data);
01278 return (status);
01279 }
|
|
|
Reimplemented in BBDMEM, FILEMEM, RPCMEM, RTLMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1281 of file cms.cc. 01282 {
01283 internal_access_type = CMS_WRITE_ACCESS;
01284 status = CMS_STATUS_NOT_SET;
01285 main_access (user_data);
01286 return (status);
01287 }
|
|
|
Reimplemented in BBDMEM, FILEMEM, RPCMEM, STCPMEM, TCPMEM, TTYMEM, and UDPMEM. Definition at line 1289 of file cms.cc. 01290 {
01291 internal_access_type = CMS_WRITE_IF_READ_ACCESS;
01292 status = CMS_STATUS_NOT_SET;
01293 main_access (user_data);
01294 return (status);
01295 }
|
|
||||||||||||
|
Reimplemented in RPCMEM, STCPMEM, and TCPMEM. Definition at line 1301 of file cms.cc. 01302 {
01303 return 1;
01304 }
|
|
|
Reimplemented in TCPMEM, and TTYMEM. Definition at line 1268 of file cms.cc. 01269 {
01270 }
|
|
|
Reimplemented in TCPMEM, and TTYMEM. Definition at line 1263 of file cms.cc. 01264 {
01265 }
|
|
|
Reimplemented in GLOBMEM, LOCMEM, PHANTOMMEM, and SHMEM. Definition at line 1133 of file cms.cc. Referenced by blocking_read(), check_if_read(), clear(), get_diagnostics_info(), get_msg_count(), peek(), read(), write(), and write_if_read().
01134 {
01135 rcs_print_error ("CMS::main_access called by %s for %s.\n",
01136 ProcessName, BufferName);
01137 rcs_print_error ("This should never happen.\n");
01138 rcs_print_error
01139 ("Derived classes should either override main_access() or\n");
01140 rcs_print_error ("the functions that call it.(read(), write(), etc.)\n");
01141 rcs_print_error ("_local = %p\n", _local);
01142 return (CMS_MISC_ERROR);
01143 }
|
|
|
|
|
|
Definition at line 1578 of file cms.cc. 01579 {
01580 if (force_raw)
01581 {
01582 return 0;
01583 }
01584 if (NULL == updater)
01585 {
01586 return (-1);
01587 }
01588 return (header.in_buffer_size = updater->get_encoded_msg_size ());
01589 }
|
|
|
Definition at line 1308 of file cms.cc. 01309 {
01310 status = CMS_STATUS_NOT_SET;
01311 if (last_im == im)
01312 {
01313 return;
01314 }
01315 if (!force_raw)
01316 {
01317 if (CMS_WRITE == im)
01318 {
01319 mode = write_mode;
01320 if (NULL != updater)
01321 {
01322 updater->set_mode ((CMS_UPDATER_MODE) write_updater_mode);
01323 }
01324 last_im = im;
01325 return;
01326 }
01327 if (CMS_READ == im)
01328 {
01329 mode = read_mode;
01330 if (NULL != updater)
01331 {
01332 updater->set_mode ((CMS_UPDATER_MODE) read_updater_mode);
01333 }
01334 last_im = im;
01335 return;
01336 }
01337 if (CMS_DECODE == im)
01338 {
01339 mode = CMS_DECODE;
01340 if (NULL != updater)
01341 {
01342 updater->set_mode (CMS_DECODE_DATA);
01343 }
01344 }
01345 if (CMS_ENCODE == im)
01346 {
01347 mode = CMS_ENCODE;
01348 if (NULL != updater)
01349 {
01350 updater->set_mode (CMS_ENCODE_DATA);
01351 }
01352 }
01353 }
01354 last_im = im;
01355 mode = im;
01356 }
|
|
|
Definition at line 1360 of file cms.cc. 01361 {
01362 if (force_raw)
01363 {
01364 return;
01365 }
01366 if (temp_updater_encoding_method != temp_encoding_method &&
01367 NULL != temp_updater)
01368 {
01369 delete temp_updater;
01370 temp_updater = (CMS_UPDATER *) NULL;
01371 }
01372 if (NULL == temp_updater)
01373 {
01374 switch (temp_encoding_method)
01375 {
01376 case CMS_XDR_ENCODING:
01377 temp_updater = new CMS_XDR_UPDATER (this);
01378 break;
01379
01380 #ifndef UNDER_CE
01381 case CMS_ASCII_ENCODING:
01382 temp_updater = new CMS_ASCII_UPDATER (this);
01383 break;
01384
01385 case CMS_DISPLAY_ASCII_ENCODING:
01386 temp_updater = new CMS_DISPLAY_ASCII_UPDATER (this);
01387 break;
01388 #endif
01389
01390 default:
01391 temp_updater = (CMS_UPDATER *) NULL;
01392 status = CMS_UPDATE_ERROR;
01393 rcs_print_error ("CMS: Invalid encoding method(%d)\n",
01394 neutral_encoding_method);
01395 break;
01396 }
01397 }
01398 if (NULL != temp_updater)
01399 {
01400 updater = temp_updater;
01401 temp_updater_encoding_method = temp_encoding_method;
01402 }
01403 }
|
|
|
Definition at line 1406 of file cms.cc. 01407 {
01408 updater = normal_updater;
01409 }
|
|
||||||||||||
|
Definition at line 79 of file cms_in.cc. Referenced by internal_access(), SHMEM::main_access(), LOCMEM::main_access(), and GLOBMEM::main_access().
00080 {
00081 status = CMS_STATUS_NOT_SET;
00082 if (NULL == _global)
00083 {
00084 rcs_print_error ("CMS: Handle to global memory is NULL.\n");
00085 return (status = CMS_INTERNAL_ACCESS_ERROR);
00086 }
00087 handle_to_global_data = _global;
00088
00089 if (CMS_CLEAR_ACCESS == internal_access_type)
00090 {
00091 internal_clear ();
00092 return (status);
00093 }
00094
00095 if (min_compatible_version > 2.58 || min_compatible_version < 1E-6)
00096 {
00097 handle_to_global_data->offset += skip_area;
00098 }
00099
00100
00101 if (CMS_GET_DIAG_INFO_ACCESS == internal_access_type)
00102 {
00103 internal_retrieve_diag_info (handle_to_global_data, _local);
00104 return (status);
00105 }
00106
00107 long orig_offset = handle_to_global_data->offset;
00108 if (enable_diagnostics)
00109 {
00110 handle_to_global_data->offset +=
00111 sizeof (CMS_DIAG_HEADER) +
00112 total_connections * sizeof (CMS_DIAG_PROC_INFO);
00113 handle_to_global_data->enable_byte_counting = 1;
00114 pre_op_total_bytes_moved = handle_to_global_data->total_bytes_moved;
00115 }
00116
00117 char was_read_byte;
00118 write_just_completed = 0;
00119 int
00120 read_only = ((internal_access_type == CMS_CHECK_IF_READ_ACCESS) ||
00121 (internal_access_type == CMS_READ_ACCESS) ||
00122 (internal_access_type == CMS_PEEK_ACCESS));
00123
00124 long offset_before_split = handle_to_global_data->offset;
00125
00126 if (total_subdivisions >= 1 && current_subdivision > 0
00127 && current_subdivision < total_subdivisions)
00128 {
00129 handle_to_global_data->offset += (current_subdivision * subdiv_size);
00130 handle_to_global_data->size = ((current_subdivision + 1) * subdiv_size);
00131 if (handle_to_global_data->size > size)
00132 {
00133 handle_to_global_data->size = size;
00134 }
00135 }
00136
00137
00138 if (split_buffer)
00139 {
00140 if (internal_access_type == CMS_WRITE_IF_READ_ACCESS)
00141 {
00142 handle_to_global_data->offset++;
00143 handle_to_global_data->read (&was_read_byte, 1);
00144 handle_to_global_data->offset--;
00145 header.was_read = (was_read_byte == toggle_bit + 1);
00146 if (!header.was_read)
00147 {
00148 status = CMS_WRITE_WAS_BLOCKED;
00149 return (status);
00150 }
00151 internal_access_type = CMS_WRITE_ACCESS;
00152 }
00153 if (read_only == toggle_bit)
00154 {
00155 handle_to_global_data->offset += 2;
00156 handle_to_global_data->size = half_size;
00157 }
00158 else
00159 {
00160 handle_to_global_data->offset += half_offset;
00161 handle_to_global_data->size = size;
00162 }
00163 }
00164
00165 if (!queuing_enabled)
00166 {
00167 if (neutral)
00168 {
00169 switch (internal_access_type)
00170 {
00171 case CMS_CHECK_IF_READ_ACCESS:
00172 check_if_read_encoded ();
00173 break;
00174 case CMS_READ_ACCESS:
00175 read_encoded ();
00176 break;
00177 case CMS_PEEK_ACCESS:
00178 peek_encoded ();
00179 break;
00180 case CMS_WRITE_ACCESS:
00181 write_encoded ();
00182 break;
00183 case CMS_WRITE_IF_READ_ACCESS:
00184 write_if_read_encoded ();
00185 break;
00186 default:
00187 return (status = CMS_INTERNAL_ACCESS_ERROR);
00188 }
00189 }
00190 else
00191 {
00192 switch (internal_access_type)
00193 {
00194 case CMS_CHECK_IF_READ_ACCESS:
00195 check_if_read_raw ();
00196 break;
00197 case CMS_READ_ACCESS:
00198 read_raw ();
00199 break;
00200 case CMS_PEEK_ACCESS:
00201 peek_raw ();
00202 break;
00203 case CMS_WRITE_ACCESS:
00204 write_raw (_local);
00205 break;
00206 case CMS_WRITE_IF_READ_ACCESS:
00207 write_if_read_raw (_local);
00208 break;
00209 default:
00210 return (status = CMS_INTERNAL_ACCESS_ERROR);
00211 }
00212 }
00213 }
00214 else
00215 {
00216 if (neutral)
00217 {
00218 switch (internal_access_type)
00219 {
00220 case CMS_CHECK_IF_READ_ACCESS:
00221 queue_check_if_read_encoded ();
00222 break;
00223 case CMS_READ_ACCESS:
00224 queue_read_encoded ();
00225 break;
00226 case CMS_PEEK_ACCESS:
00227 queue_peek_encoded ();
00228 break;
00229 case CMS_WRITE_ACCESS:
00230 queue_write_encoded ();
00231 break;
00232 case CMS_WRITE_IF_READ_ACCESS:
00233 queue_write_if_read_encoded ();
00234 break;
00235 default:
00236 return (status = CMS_INTERNAL_ACCESS_ERROR);
00237 }
00238 }
00239 else
00240 {
00241 switch (internal_access_type)
00242 {
00243 case CMS_CHECK_IF_READ_ACCESS:
00244 queue_check_if_read_raw ();
00245 break;
00246 case CMS_READ_ACCESS:
00247 queue_read_raw ();
00248 break;
00249 case CMS_PEEK_ACCESS:
00250 queue_peek_raw ();
00251 break;
00252 case CMS_WRITE_ACCESS:
00253 queue_write_raw (_local);
00254 break;
00255 case CMS_WRITE_IF_READ_ACCESS:
00256 queue_write_if_read_raw (_local);
00257 break;
00258 default:
00259 return (status = CMS_INTERNAL_ACCESS_ERROR);
00260 }
00261 }
00262 }
00263
00264 if (split_buffer)
00265 {
00266 handle_to_global_data->offset = offset_before_split + 1;
00267 if (internal_access_type == CMS_READ_ACCESS)
00268 {
00269 was_read_byte = 1;
00270 }
00271 else if (!read_only)
00272 {
00273 was_read_byte = 0;
00274 }
00275 if (-1 == handle_to_global_data->write (&was_read_byte, 1))
00276 {
00277 rcs_print_error ("CMS: can not set was read flag.\n");
00278 }
00279 }
00280
00281
00282 if (enable_diagnostics)
00283 {
00284 handle_to_global_data->offset = orig_offset;
00285 calculate_and_store_diag_info (handle_to_global_data, _local);
00286 }
00287 return (status);
00288 }
|
|
||||||||||||||||
|
Definition at line 50 of file cms_in.cc. 00051 {
00052 /* Don't bother trying to create a physmem handle for a NULL pointer. */
00053 if (NULL == _global)
00054 {
00055 return (status = CMS_INTERNAL_ACCESS_ERROR);
00056 }
00057
00058 /* Create a dummy physmem handle if I don't already have one. */
00059 if (NULL == dummy_handle)
00060 {
00061 dummy_handle = new PHYSMEM_HANDLE;
00062 }
00063
00064 /* Check for problem allocating memory. */
00065 if (NULL == dummy_handle)
00066 {
00067 rcs_print_error ("CMS: Couldn't create PHYSMEM_HANDLE.\n");
00068 return (status = CMS_INTERNAL_ACCESS_ERROR);
00069 }
00070
00071 dummy_handle->set_to_ptr (_global, _global_size);
00072 internal_access (dummy_handle, _local);
00073 return (status);
00074 }
|
|
|
Definition at line 292 of file cms_in.cc. Referenced by internal_access().
00293 {
00294 in_buffer_id = 0;
00295
00296 /* Check that the handle to global memory exists. */
00297 if (NULL == handle_to_global_data)
00298 {
00299 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00300 return (status = CMS_INTERNAL_ACCESS_ERROR);
00301 }
00302
00303 if (-1 == handle_to_global_data->clear_memory ())
00304 {
00305 rcs_print_error ("CMS: Can't clear global_memory.\n");
00306 return (status = CMS_INTERNAL_ACCESS_ERROR);
00307 }
00308 int temp_offset = handle_to_global_data->offset;
00309 handle_to_global_data->offset = 0;
00310 if (-1 == handle_to_global_data->write (BufferName, 32))
00311 {
00312 rcs_print_error ("CMS: Can't clear reset name in global memory.\n");
00313 return (status = CMS_INTERNAL_ACCESS_ERROR);
00314 }
00315 handle_to_global_data->offset = temp_offset;
00316
00317 return (status = CMS_CLEAR_OK);
00318 }
|
|
|
Definition at line 322 of file cms_in.cc. Referenced by internal_access().
00323 {
00324 /* Check that the handle to global memory exists. */
00325 if (NULL == handle_to_global_data)
00326 {
00327 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00328 status = CMS_INTERNAL_ACCESS_ERROR;
00329 return 0;
00330 }
00331
00332 /* Read the header for the message. */
00333 if (-1 == handle_to_global_data->read (&header, sizeof (CMS_HEADER)))
00334 {
00335 rcs_print_error
00336 ("CMS: Error reading from global memory for %s at %s:%d", BufferName,
00337 __FILE__, __LINE__);
00338 status = CMS_INTERNAL_ACCESS_ERROR;
00339 return 0;
00340 }
00341 return ((int) header.was_read);
00342 }
|
|
|
Definition at line 373 of file cms_in.cc. Referenced by internal_access().
00374 {
00375 /* Check that the handle to global memory exists. */
00376 if (NULL == handle_to_global_data)
00377 {
00378 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00379 status = CMS_INTERNAL_ACCESS_ERROR;
00380 return 0;
00381 }
00382
00383 /* Read the header for the buffer. */
00384 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
00385 {
00386 rcs_print_error
00387 ("CMS: Error reading from global memory for %s at %s:%d\n",
00388 BufferName, __FILE__, __LINE__);
00389 status = CMS_INTERNAL_ACCESS_ERROR;
00390 return 0;
00391 }
00392
00393 /* Decode the header and store in header structure. */
00394 decode_header ();
00395
00396 return ((int) header.was_read);
00397 }
|
|
|
|
|
|
|
|
|
Definition at line 434 of file cms_in.cc. Referenced by internal_access().
00435 {
00436 /* Produce error message if process does not have permission to read. */
00437 if (!read_permission_flag)
00438 {
00439 rcs_print_error ("CMS: %s was not configured to read %s\n",
00440 ProcessName, BufferName);
00441 return (status = CMS_PERMISSIONS_ERROR);
00442 }
00443
00444
00445 /* Check that the handle to global memory exists. */
00446 if (NULL == handle_to_global_data)
00447 {
00448 rcs_print_error ("CMS:(%s) handle_to_global_data is NULL.\n",
00449 BufferName);
00450 return (status = CMS_INTERNAL_ACCESS_ERROR);
00451 }
00452
00453 /* Read the header for the message. */
00454 if (-1 == handle_to_global_data->read (&header, sizeof (CMS_HEADER)))
00455 {
00456 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00457 BufferName, __FILE__, __LINE__);
00458 return (status = CMS_INTERNAL_ACCESS_ERROR);
00459 }
00460
00461 /* Set status to CMS_READ_OLD or CMS_READ_OK */
00462 if (check_id (header.write_id) == CMS_READ_OK)
00463 {
00464 /* Check the size of the message. */
00465 if (header.in_buffer_size > max_message_size)
00466 {
00467 rcs_print_error
00468 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n",
00469 BufferName, header.in_buffer_size, max_message_size);
00470 return (status = CMS_INTERNAL_ACCESS_ERROR);
00471 }
00472
00473
00474 /* Read the message. */
00475 handle_to_global_data->offset += sizeof (CMS_HEADER);
00476 if (-1 ==
00477 handle_to_global_data->read (subdiv_data,
00478 (long) header.in_buffer_size))
00479 {
00480 rcs_print_error
00481 ("CMS:(%s) Error reading from global memory at %s:%d\n",
00482 BufferName, __FILE__, __LINE__);
00483 return (status = CMS_INTERNAL_ACCESS_ERROR);
00484 }
00485 handle_to_global_data->offset -= sizeof (CMS_HEADER);
00486 }
00487
00488 /* Update the header. */
00489 header.was_read = 1;
00490 if (-1 == handle_to_global_data->write (&header, sizeof (CMS_HEADER)))
00491 {
00492 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00493 BufferName, __FILE__, __LINE__);
00494 return (status = CMS_INTERNAL_ACCESS_ERROR);
00495 }
00496
00497 return (status);
00498 }
|
|
|
Definition at line 613 of file cms_in.cc. Referenced by internal_access().
00614 {
00615 /* Produce error message if process does not have permission to read. */
00616 if (!read_permission_flag)
00617 {
00618 rcs_print_error ("CMS: %s was not configured to read %s\n",
00619 ProcessName, BufferName);
00620 return (status = CMS_PERMISSIONS_ERROR);
00621 }
00622
00623
00624 /* Check that the handle to the global memory object exists. */
00625 if (NULL == handle_to_global_data)
00626 {
00627 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00628 return (status = CMS_INTERNAL_ACCESS_ERROR);
00629 }
00630
00631 /* Read the encoded header for the message. */
00632 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
00633 {
00634 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00635 BufferName, __FILE__, __LINE__);
00636 return (status = CMS_INTERNAL_ACCESS_ERROR);
00637 }
00638
00639 /* Decode the header and store in header structure. */
00640 decode_header ();
00641
00642 /* Determine if the message in the buffer is new to this process. */
00643 if (check_id (header.write_id) == CMS_READ_OK)
00644 {
00645 /* Check the size of the message. */
00646 if (header.in_buffer_size > max_message_size)
00647 {
00648 rcs_print_error
00649 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n",
00650 BufferName, header.in_buffer_size, max_message_size);
00651 return (status = CMS_INTERNAL_ACCESS_ERROR);
00652 }
00653
00654 /* Read the message. */
00655 handle_to_global_data->offset += encoded_header_size;
00656 if (-1 == handle_to_global_data->read (encoded_data,
00657 (long) header.in_buffer_size))
00658 {
00659 rcs_print_error
00660 ("CMS:(%s) Error writing to global memory at %s:%d\n", BufferName,
00661 __FILE__, __LINE__);
00662 return (status = CMS_INTERNAL_ACCESS_ERROR);
00663 }
00664 handle_to_global_data->offset -= encoded_header_size;
00665 }
00666
00667 /* Update the header. */
00668 header.was_read = 1;
00669
00670 encode_header ();
00671 if (-1 ==
00672 handle_to_global_data->write (encoded_header, encoded_header_size))
00673 {
00674 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00675 BufferName, __FILE__, __LINE__);
00676 return (status = CMS_INTERNAL_ACCESS_ERROR);
00677 }
00678
00679 return (status);
00680 }
|
|
|
Definition at line 812 of file cms_in.cc. Referenced by internal_access().
00813 {
00814 /* Produce error message if process does not have permission to read. */
00815 if (!read_permission_flag)
00816 {
00817 rcs_print_error ("CMS: %s was not configured to read %s\n",
00818 ProcessName, BufferName);
00819 return (status = CMS_PERMISSIONS_ERROR);
00820 }
00821
00822 /* Check that the handle to global memory exists. */
00823 if (NULL == handle_to_global_data)
00824 {
00825 rcs_print_error ("CMS:(%s) handle_to_global_data is NULL.\n",
00826 BufferName);
00827 return (status = CMS_INTERNAL_ACCESS_ERROR);
00828 }
00829
00830 /* Read the header for the message. */
00831 if (-1 == handle_to_global_data->read (&header, sizeof (CMS_HEADER)))
00832 {
00833 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00834 BufferName, __FILE__, __LINE__);
00835 return (status = CMS_INTERNAL_ACCESS_ERROR);
00836 }
00837
00838 /* Set status to CMS_READ_OLD or CMS_READ_OK */
00839 if (check_id (header.write_id) == CMS_READ_OLD)
00840 {
00841 return (status); /* Don't bother copying out an old message. */
00842 }
00843
00844 /* Check the size of the message. */
00845 if (header.in_buffer_size > max_message_size)
00846 {
00847 rcs_print_error
00848 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
00849 header.in_buffer_size, max_message_size);
00850 return (status = CMS_INTERNAL_ACCESS_ERROR);
00851 }
00852
00853 /* Read the message. */
00854 handle_to_global_data->offset += sizeof (CMS_HEADER);
00855 if (-1 ==
00856 handle_to_global_data->read (subdiv_data, (long) header.in_buffer_size))
00857 {
00858 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00859 BufferName, __FILE__, __LINE__);
00860 return (status = CMS_INTERNAL_ACCESS_ERROR);
00861 }
00862
00863 return (status);
00864 }
|
|
|
Definition at line 952 of file cms_in.cc. Referenced by internal_access().
00953 {
00954 /* Produce error message if process does not have permission to read. */
00955 if (!read_permission_flag)
00956 {
00957 rcs_print_error ("CMS: %s was not configured to read %s\n",
00958 ProcessName, BufferName);
00959 return (status = CMS_PERMISSIONS_ERROR);
00960 }
00961
00962
00963 /* Check that the handle to the global memory object exists. */
00964 if (NULL == handle_to_global_data)
00965 {
00966 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00967 return (status = CMS_INTERNAL_ACCESS_ERROR);
00968 }
00969
00970 /* Read the encoded header for the message. */
00971 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
00972 {
00973 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00974 BufferName, __FILE__, __LINE__);
00975 return (status = CMS_INTERNAL_ACCESS_ERROR);
00976 }
00977
00978 /* Decode the header and store in header structure. */
00979 decode_header ();
00980
00981 /* Determine if the message in the buffer is new to this process. */
00982 if (CMS_READ_OLD == check_id (header.write_id))
00983 {
00984 return (CMS_READ_OLD); /* Don't bother reading an old message. */
00985 }
00986
00987 /* Check the size of the message. */
00988 if (header.in_buffer_size > max_message_size)
00989 {
00990 rcs_print_error
00991 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
00992 header.in_buffer_size, max_message_size);
00993 return (status = CMS_INTERNAL_ACCESS_ERROR);
00994 }
00995
00996 /* Read the message. */
00997 handle_to_global_data->offset += encoded_header_size;
00998 if (-1 == handle_to_global_data->read (encoded_data,
00999 (long) header.in_buffer_size))
01000 {
01001 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01002 BufferName, __FILE__, __LINE__);
01003 return (status = CMS_INTERNAL_ACCESS_ERROR);
01004 }
01005
01006 return (status);
01007 }
|
|
|
Definition at line 1105 of file cms_in.cc. Referenced by internal_access().
01106 {
01107 long current_header_in_buffer_size;
01108
01109 /* Produce error message if process does not have permission to read. */
01110 if (!write_permission_flag)
01111
01112 {
01113 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01114 ProcessName, BufferName);
01115 return (status = CMS_PERMISSIONS_ERROR);
01116 }
01117
01118 /* Store the header information to use after reading the header in the buffer. */
01119 current_header_in_buffer_size = header.in_buffer_size;
01120
01121 /* Check that handle to global memory object exists. */
01122 if (NULL == handle_to_global_data)
01123 {
01124 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01125 return (status = CMS_INTERNAL_ACCESS_ERROR);
01126 }
01127
01128 #if 0
01129 /* Check that buffer is large enough for this message. */
01130 if (header.in_buffer_size > max_message_size)
01131 {
01132 rcs_print_error
01133 ("CMS:(%s) Message size %ld exceeds maximum for this buffer of %ld.\n",
01134 BufferName, header.in_buffer_size, max_message_size);
01135 return (status = CMS_INTERNAL_ACCESS_ERROR);
01136 }
01137 #endif
01138
01139 /* Read the header. */
01140 if (-1 == handle_to_global_data->read (&header, sizeof (header)))
01141 {
01142 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01143 BufferName, __FILE__, __LINE__);
01144 return (status = CMS_INTERNAL_ACCESS_ERROR);
01145 }
01146
01147 /* Update the header. */
01148 header.was_read = 0;
01149 header.write_id++;
01150 if (split_buffer)
01151 {
01152 if ((header.write_id & 1) != toggle_bit)
01153 {
01154 header.write_id++;
01155 }
01156 }
01157 header.in_buffer_size = current_header_in_buffer_size;
01158 if (-1 == handle_to_global_data->write (&header, sizeof (header)))
01159 {
01160 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01161 BufferName, __FILE__, __LINE__);
01162 return (status = CMS_INTERNAL_ACCESS_ERROR);
01163 }
01164
01165 /* Write the message. */
01166 if (!disable_final_write_raw_for_dma)
01167 {
01168 handle_to_global_data->offset += sizeof (CMS_HEADER);
01169 if (-1 == handle_to_global_data->write (user_data,
01170 (long)
01171 current_header_in_buffer_size))
01172 {
01173 rcs_print_error
01174 ("CMS:(%s) Error writing %ld bytes to global memory at offset %X\n (See %s line %d.)\n",
01175 BufferName, header.in_buffer_size, user_data, __FILE__,
01176 __LINE__);
01177 return (status = CMS_INTERNAL_ACCESS_ERROR);
01178 }
01179 }
01180
01181 return (status = CMS_WRITE_OK);
01182 }
|
|
|
Definition at line 1342 of file cms_in.cc. Referenced by internal_access().
01343 {
01344 CMS_HEADER current_header;
01345
01346 /* Produce error message if process does not have permission to read. */
01347 if (!write_permission_flag)
01348
01349 {
01350 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01351 ProcessName, BufferName);
01352 return (status = CMS_PERMISSIONS_ERROR);
01353 }
01354
01355
01356 /* Store the header information to use after reading the header in the buffer. */
01357 current_header = header;
01358
01359 /* Check that handle to global memory object exists. */
01360 if (NULL == handle_to_global_data)
01361 {
01362 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01363 return (status = CMS_INTERNAL_ACCESS_ERROR);
01364 }
01365
01366 /* Check that buffer is large enough for this message. */
01367 if (header.in_buffer_size > max_message_size)
01368 {
01369 rcs_print_error
01370 ("CMS:(%s) Message size %ld exceeds maximum for this buffer of %ld.\n",
01371 BufferName, header.in_buffer_size, max_message_size);
01372 return (status = CMS_INTERNAL_ACCESS_ERROR);
01373 }
01374
01375 /* Read the header. */
01376 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
01377 {
01378 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01379 BufferName, __FILE__, __LINE__);
01380 return (status = CMS_INTERNAL_ACCESS_ERROR);
01381 }
01382 /* Decode the header and store in the header structure. */
01383 decode_header ();
01384
01385 /* Update the header. */
01386 header.was_read = 0;
01387 header.write_id++;
01388 if (split_buffer && (header.write_id % 2) != toggle_bit)
01389 {
01390 header.write_id++;
01391 }
01392 header.in_buffer_size = current_header.in_buffer_size;
01393 encode_header ();
01394 if (-1 ==
01395 handle_to_global_data->write (encoded_header, encoded_header_size))
01396 {
01397 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01398 BufferName, __FILE__, __LINE__);
01399 return (status = CMS_INTERNAL_ACCESS_ERROR);
01400 }
01401
01402 /* Write the message. */
01403 handle_to_global_data->offset += encoded_header_size;
01404 if (-1 == handle_to_global_data->write (encoded_data,
01405 (long) header.in_buffer_size))
01406 {
01407 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01408 BufferName, __FILE__, __LINE__);
01409 return (status = CMS_INTERNAL_ACCESS_ERROR);
01410 }
01411
01412 return (status = CMS_WRITE_OK);
01413 }
|
|
|
Definition at line 1583 of file cms_in.cc. Referenced by internal_access().
01584 {
01585 CMS_HEADER current_header;
01586
01587 /* Produce error message if process does not have permission to read. */
01588 if (!write_permission_flag)
01589
01590 {
01591 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01592 ProcessName, BufferName);
01593 return (status = CMS_PERMISSIONS_ERROR);
01594 }
01595
01596 /* Store the header information to use after reading the header in the buffer. */
01597 current_header = header;
01598
01599 /* Check that handle to global memory object exists. */
01600 if (NULL == handle_to_global_data)
01601 {
01602 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01603 return (status = CMS_INTERNAL_ACCESS_ERROR);
01604 }
01605
01606 /* Check that buffer is large enough for this message. */
01607 if (header.in_buffer_size > max_message_size)
01608 {
01609 rcs_print_error
01610 ("CMS:(%s) Message size %ld exceeds maximum for this buffer of %ld.\n",
01611 BufferName, header.in_buffer_size, max_message_size);
01612 return (status = CMS_INTERNAL_ACCESS_ERROR);
01613 }
01614
01615 /* Read the header. */
01616 if (-1 == handle_to_global_data->read (&header, sizeof (header)))
01617 {
01618 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01619 BufferName, __FILE__, __LINE__);
01620 return (status = CMS_INTERNAL_ACCESS_ERROR);
01621 }
01622
01623 /* Check if the message in the buffer has been read. */
01624 if (!header.was_read)
01625 {
01626 return (status = CMS_WRITE_WAS_BLOCKED);
01627 }
01628
01629 /* Update the header. */
01630 header.was_read = 0;
01631 header.write_id++;
01632 if (split_buffer && (header.write_id % 2) != toggle_bit)
01633 {
01634 header.write_id++;
01635 }
01636 header.in_buffer_size = current_header.in_buffer_size;
01637 if (-1 == handle_to_global_data->write (&header, sizeof (header)))
01638 {
01639 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01640 BufferName, __FILE__, __LINE__);
01641 return (status = CMS_INTERNAL_ACCESS_ERROR);
01642 }
01643
01644 /* Write the message. */
01645 handle_to_global_data->offset += sizeof (CMS_HEADER);
01646 if (-1 == handle_to_global_data->write (user_data,
01647 (long) header.in_buffer_size))
01648 {
01649 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01650 BufferName, __FILE__, __LINE__);
01651 return (status = CMS_INTERNAL_ACCESS_ERROR);
01652 }
01653
01654 return (status = CMS_WRITE_OK);
01655 }
|
|
|
Definition at line 1823 of file cms_in.cc. Referenced by internal_access().
01824 {
01825 CMS_HEADER current_header;
01826
01827 /* Produce error message if process does not have permission to read. */
01828 if (!write_permission_flag)
01829
01830 {
01831 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01832 ProcessName, BufferName);
01833 return (status = CMS_PERMISSIONS_ERROR);
01834 }
01835
01836 /* Store the header information to use after reading the header in the buffer. */
01837 current_header = header;
01838
01839 /* Check that handle to global memory object exists. */
01840 if (NULL == handle_to_global_data)
01841 {
01842 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01843 return (status = CMS_INTERNAL_ACCESS_ERROR);
01844 }
01845
01846 /* Check that buffer is large enough for this message. */
01847 if (header.in_buffer_size > max_message_size)
01848 {
01849 rcs_print_error
01850 ("CMS:(%s) Message size %ld exceeds maximum for this buffer of %ld.\n",
01851 BufferName, header.in_buffer_size, max_message_size);
01852 return (status = CMS_INTERNAL_ACCESS_ERROR);
01853 }
01854
01855 /* Read the header. */
01856 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
01857 {
01858 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01859 BufferName, __FILE__, __LINE__);
01860 return (status = CMS_INTERNAL_ACCESS_ERROR);
01861 }
01862 /* Decode the header and store in the header structure. */
01863 decode_header ();
01864
01865 /* Check if the message in the buffer has been read. */
01866 if (!header.was_read)
01867 {
01868 return (status = CMS_WRITE_WAS_BLOCKED);
01869 }
01870
01871 /* Update the header. */
01872 header.was_read = 0;
01873 header.write_id++;
01874 if (split_buffer && (header.write_id % 2) != toggle_bit)
01875 {
01876 header.write_id++;
01877 }
01878 header.in_buffer_size = current_header.in_buffer_size;
01879 encode_header ();
01880 if (-1 ==
01881 handle_to_global_data->write (encoded_header, encoded_header_size))
01882 {
01883 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01884 BufferName, __FILE__, __LINE__);
01885 return (status = CMS_INTERNAL_ACCESS_ERROR);
01886 }
01887
01888 /* Write the message. */
01889 handle_to_global_data->offset += encoded_header_size;
01890 if (-1 == handle_to_global_data->write (encoded_data,
01891 (long) header.in_buffer_size))
01892 {
01893 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01894 BufferName, __FILE__, __LINE__);
01895 return (status = CMS_INTERNAL_ACCESS_ERROR);
01896 }
01897
01898 return (status = CMS_WRITE_OK);
01899 }
|
|
|
Definition at line 347 of file cms_in.cc. Referenced by internal_access().
00348 {
00349 /* Check that the handle to global memory exists. */
00350 if (NULL == handle_to_global_data)
00351 {
00352 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00353 status = CMS_INTERNAL_ACCESS_ERROR;
00354 return 0;
00355 }
00356
00357 /* Read the header for the buffer. */
00358 if (-1 == handle_to_global_data->read (&queuing_header,
00359 sizeof (CMS_QUEUING_HEADER)))
00360 {
00361 rcs_print_error
00362 ("CMS: Error reading from global memory for %s at %s:%d\n",
00363 BufferName, __FILE__, __LINE__);
00364 status = CMS_INTERNAL_ACCESS_ERROR;
00365 return 0;
00366 }
00367
00368 return ((int) (queuing_header.queue_length == 0));
00369 }
|
|
|
Definition at line 402 of file cms_in.cc. Referenced by internal_access().
00403 {
00404 /* Check that the handle to global memory exists. */
00405 if (NULL == handle_to_global_data)
00406 {
00407 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00408 status = CMS_INTERNAL_ACCESS_ERROR;
00409 return 0;
00410 }
00411
00412 /* Read the header for the buffer. */
00413 if (-1 == handle_to_global_data->read (encoded_queuing_header,
00414 encoded_queuing_header_size))
00415 {
00416 rcs_print_error
00417 ("CMS: Error reading from global memory for %s at %s:%d\n",
00418 BufferName, __FILE__, __LINE__);
00419 status = CMS_INTERNAL_ACCESS_ERROR;
00420 return 0;
00421 }
00422
00423 /* Decode the header and store in queuing_header structure. */
00424 decode_queuing_header ();
00425
00426 return ((int) (queuing_header.queue_length == 0));
00427 }
|
|
|
Definition at line 509 of file cms_in.cc. Referenced by internal_access().
00510 {
00511 long queuing_header_offset;
00512
00513 /* Produce error message if process does not have permission to read. */
00514 if (!read_permission_flag)
00515 {
00516 rcs_print_error ("CMS: %s was not configured to read %s\n",
00517 ProcessName, BufferName);
00518 return (status = CMS_PERMISSIONS_ERROR);
00519 }
00520
00521
00522 /* Check that the handle to global memory exists. */
00523 if (NULL == handle_to_global_data)
00524 {
00525 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00526 return (status = CMS_INTERNAL_ACCESS_ERROR);
00527 }
00528
00529 /* Store the original offset so that we can update the header later. */
00530 queuing_header_offset = handle_to_global_data->offset;
00531
00532 /* Read the queuing header for the buffer. */
00533 if (-1 == handle_to_global_data->read (&queuing_header,
00534 sizeof (CMS_QUEUING_HEADER)))
00535 {
00536 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00537 BufferName, __FILE__, __LINE__);
00538 return (status = CMS_INTERNAL_ACCESS_ERROR);
00539 }
00540
00541 /* Check to see if there are any unread messages. */
00542 if (queuing_header.queue_length == 0)
00543 {
00544 return (status = CMS_READ_OLD);
00545 }
00546
00547 /* Read the header for the message. */
00548 handle_to_global_data->offset += queuing_header.head;
00549 if (-1 == handle_to_global_data->read (&header, sizeof (CMS_HEADER)))
00550 {
00551 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00552 BufferName, __FILE__, __LINE__);
00553 return (status = CMS_INTERNAL_ACCESS_ERROR);
00554 }
00555
00556 /* Check the size of the message. */
00557 if (header.in_buffer_size > max_message_size)
00558 {
00559 rcs_print_error
00560 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
00561 header.in_buffer_size, max_message_size);
00562 return (status = CMS_INTERNAL_ACCESS_ERROR);
00563 }
00564
00565 /* Update the message header. */
00566 header.was_read = 1;
00567 if (-1 == handle_to_global_data->write (&header, sizeof (CMS_HEADER)))
00568 {
00569 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00570 BufferName, __FILE__, __LINE__);
00571 return (status = CMS_INTERNAL_ACCESS_ERROR);
00572 }
00573
00574 /* Read the message. */
00575 handle_to_global_data->offset += sizeof (CMS_HEADER);
00576 if (-1 ==
00577 handle_to_global_data->read (subdiv_data, (long) header.in_buffer_size))
00578 {
00579 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00580 BufferName, __FILE__, __LINE__);
00581 return (status = CMS_INTERNAL_ACCESS_ERROR);
00582 }
00583
00584 /* Update the queuing header for the buffer. */
00585 queuing_header.head += header.in_buffer_size + sizeof (CMS_HEADER);
00586 if (queuing_header.head >= queuing_header.end_queue_space &&
00587 queuing_header.queue_length > 1)
00588 {
00589 queuing_header.head = sizeof (CMS_QUEUING_HEADER);
00590 }
00591 queuing_header.queue_length--;
00592 handle_to_global_data->offset = queuing_header_offset;
00593 if (-1 == handle_to_global_data->write (&queuing_header,
00594 sizeof (CMS_QUEUING_HEADER)))
00595 {
00596 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00597 BufferName, __FILE__, __LINE__);
00598 return (status = CMS_INTERNAL_ACCESS_ERROR);
00599 }
00600
00601 /* Check_id so that debug variables for messages missed can be set. */
00602 check_id (header.write_id);
00603
00604 return (status);
00605 }
|
|
|
Definition at line 693 of file cms_in.cc. Referenced by internal_access().
00694 {
00695 long queuing_header_offset;
00696
00697 /* Produce error message if process does not have permission to read. */
00698 if (!read_permission_flag)
00699 {
00700 rcs_print_error ("CMS: %s was not configured to read %s\n",
00701 ProcessName, BufferName);
00702 return (status = CMS_PERMISSIONS_ERROR);
00703 }
00704
00705
00706 /* Check that the handle to global memory exists. */
00707 if (NULL == handle_to_global_data)
00708 {
00709 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00710 return (status = CMS_INTERNAL_ACCESS_ERROR);
00711 }
00712
00713 /* Store the original offset so we can update the queuing header later. */
00714 queuing_header_offset = handle_to_global_data->offset;
00715
00716 /* Read the encoded header for the buffer. */
00717 if (-1 == handle_to_global_data->read (encoded_queuing_header,
00718 encoded_queuing_header_size))
00719 {
00720 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00721 BufferName, __FILE__, __LINE__);
00722 return (status = CMS_INTERNAL_ACCESS_ERROR);
00723 }
00724
00725 /* Decode the queuing header and store in the queuing_header structrure. */
00726 decode_queuing_header ();
00727
00728 /* Determine if there are any unread messages. */
00729 if (queuing_header.queue_length == 0)
00730 {
00731 return (status = CMS_READ_OLD);
00732 }
00733
00734 /* Read the header for the message. */
00735 handle_to_global_data->offset += queuing_header.head;
00736 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
00737 {
00738 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00739 BufferName, __FILE__, __LINE__);
00740 return (status = CMS_INTERNAL_ACCESS_ERROR);
00741 }
00742
00743 /* Decode the message header and store in the header structure. */
00744 decode_header ();
00745
00746 /* Check the size of the message. */
00747 if (header.in_buffer_size > max_message_size)
00748 {
00749 rcs_print_error
00750 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
00751 header.in_buffer_size, max_message_size);
00752 return (status = CMS_INTERNAL_ACCESS_ERROR);
00753 }
00754
00755 /* Update the message header. */
00756 header.was_read = 1;
00757 encode_header ();
00758 if (-1 ==
00759 handle_to_global_data->write (encoded_header, encoded_header_size))
00760 {
00761 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00762 BufferName, __FILE__, __LINE__);
00763 return (status = CMS_INTERNAL_ACCESS_ERROR);
00764 }
00765
00766 /* Read the message. */
00767 handle_to_global_data->offset += encoded_header_size;
00768 if (-1 ==
00769 handle_to_global_data->read (encoded_data,
00770 (long) header.in_buffer_size))
00771 {
00772 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00773 BufferName, __FILE__, __LINE__);
00774 return (status = CMS_INTERNAL_ACCESS_ERROR);
00775 }
00776
00777
00778 /* Update the buffer header. */
00779 queuing_header.head += header.in_buffer_size + encoded_header_size;
00780 if (queuing_header.head >= queuing_header.end_queue_space &&
00781 queuing_header.queue_length > 1)
00782 {
00783 queuing_header.head = encoded_queuing_header_size;
00784 }
00785 queuing_header.queue_length--;
00786 encode_queuing_header ();
00787 handle_to_global_data->offset = queuing_header_offset;
00788 if (-1 == handle_to_global_data->write (&queuing_header,
00789 sizeof (CMS_QUEUING_HEADER)))
00790 {
00791 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
00792 BufferName, __FILE__, __LINE__);
00793 return (status = CMS_INTERNAL_ACCESS_ERROR);
00794 }
00795
00796 /* Check_id so that debug variables for messages missed can be set. */
00797 check_id (header.write_id);
00798
00799 return (status);
00800 }
|
|
|
Definition at line 874 of file cms_in.cc. Referenced by internal_access().
00875 {
00876 long queuing_header_offset;
00877
00878 /* Produce error message if process does not have permission to read. */
00879 if (!read_permission_flag)
00880 {
00881 rcs_print_error ("CMS: %s was not configured to read %s\n",
00882 ProcessName, BufferName);
00883 return (status = CMS_PERMISSIONS_ERROR);
00884 }
00885
00886 /* Check that the handle to global memory exists. */
00887 if (NULL == handle_to_global_data)
00888 {
00889 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
00890 return (status = CMS_INTERNAL_ACCESS_ERROR);
00891 }
00892
00893 /* Store the original offset so that we can update the header later. */
00894 queuing_header_offset = handle_to_global_data->offset;
00895
00896 /* Read the queuing header for the buffer. */
00897 if (-1 == handle_to_global_data->read (&queuing_header,
00898 sizeof (CMS_QUEUING_HEADER)))
00899 {
00900 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00901 BufferName, __FILE__, __LINE__);
00902 return (status = CMS_INTERNAL_ACCESS_ERROR);
00903 }
00904
00905 /* Check to see if there are any unread messages. */
00906 if (queuing_header.queue_length == 0)
00907 {
00908 return (status = CMS_READ_OLD);
00909 }
00910
00911 /* Read the header for the message. */
00912 handle_to_global_data->offset += queuing_header.head;
00913 if (-1 == handle_to_global_data->read (&header, sizeof (CMS_HEADER)))
00914 {
00915 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00916 BufferName, __FILE__, __LINE__);
00917 return (status = CMS_INTERNAL_ACCESS_ERROR);
00918 }
00919
00920 /* Check the size of the message. */
00921 if (header.in_buffer_size > max_message_size)
00922 {
00923 rcs_print_error
00924 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
00925 header.in_buffer_size, max_message_size);
00926 return (status = CMS_INTERNAL_ACCESS_ERROR);
00927 }
00928
00929 /* Read the message. */
00930 handle_to_global_data->offset += sizeof (CMS_HEADER);
00931 if (-1 ==
00932 handle_to_global_data->read (subdiv_data, (long) header.in_buffer_size))
00933 {
00934 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
00935 BufferName, __FILE__, __LINE__);
00936 return (status = CMS_INTERNAL_ACCESS_ERROR);
00937 }
00938
00939 /* Check_id so that debug variables for messages missed can be set. */
00940 check_id (header.write_id);
00941
00942 return (status);
00943 }
|
|
|
Definition at line 1020 of file cms_in.cc. Referenced by internal_access().
01021 {
01022 long queuing_header_offset;
01023
01024 /* Produce error message if process does not have permission to read. */
01025 if (!read_permission_flag)
01026 {
01027 rcs_print_error ("CMS: %s was not configured to read %s\n",
01028 ProcessName, BufferName);
01029 return (status = CMS_PERMISSIONS_ERROR);
01030 }
01031
01032 /* Check that the handle to global memory exists. */
01033 if (NULL == handle_to_global_data)
01034 {
01035 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01036 return (status = CMS_INTERNAL_ACCESS_ERROR);
01037 }
01038
01039 /* Store the original offset so we can update the queuing header later. */
01040 queuing_header_offset = handle_to_global_data->offset;
01041
01042 /* Read the encoded header for the buffer. */
01043 if (-1 == handle_to_global_data->read (encoded_queuing_header,
01044 encoded_queuing_header_size))
01045 {
01046 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01047 BufferName, __FILE__, __LINE__);
01048 return (status = CMS_INTERNAL_ACCESS_ERROR);
01049 }
01050
01051 /* Decode the queuing header and store in the queuing_header structrure. */
01052 decode_queuing_header ();
01053
01054 /* Determine if there are any unread messages. */
01055 if (queuing_header.queue_length == 0)
01056 {
01057 return (status = CMS_READ_OLD);
01058 }
01059
01060 /* Read the header for the message. */
01061 handle_to_global_data->offset += queuing_header.head;
01062 if (-1 == handle_to_global_data->read (encoded_header, encoded_header_size))
01063 {
01064 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01065 BufferName, __FILE__, __LINE__);
01066 return (status = CMS_INTERNAL_ACCESS_ERROR);
01067 }
01068
01069 /* Decode the message header and store in the header structure. */
01070 decode_header ();
01071
01072 /* Check the size of the message. */
01073 if (header.in_buffer_size > max_message_size)
01074 {
01075 rcs_print_error
01076 ("CMS:(%s) Message size of %ld exceeds maximum of %ld\n", BufferName,
01077 header.in_buffer_size, max_message_size);
01078 return (status = CMS_INTERNAL_ACCESS_ERROR);
01079 }
01080
01081 /* Read the message. */
01082 handle_to_global_data->offset += encoded_header_size;
01083 if (-1 ==
01084 handle_to_global_data->read (encoded_data,
01085 (long) header.in_buffer_size))
01086 {
01087 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01088 BufferName, __FILE__, __LINE__);
01089 return (status = CMS_INTERNAL_ACCESS_ERROR);
01090 }
01091
01092 /* Check_id so that debug variables for messages missed can be set. */
01093 check_id (header.write_id);
01094
01095 return (status);
01096 }
|
|
|
Definition at line 1193 of file cms_in.cc. Referenced by internal_access().
01194 {
01195 CMS_HEADER current_header;
01196 long free_space;
01197 long queuing_header_offset;
01198 long original_tail;
01199
01200 /* Produce error message if process does not have permission to read. */
01201 if (!write_permission_flag)
01202
01203 {
01204 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01205 ProcessName, BufferName);
01206 return (status = CMS_PERMISSIONS_ERROR);
01207 }
01208
01209
01210 /* Store the header information to use after reading the header in the buffer. */
01211 current_header = header;
01212
01213 /* Check that the handle to the global memory object exists. */
01214 if (NULL == handle_to_global_data)
01215 {
01216 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01217 return (status = CMS_INTERNAL_ACCESS_ERROR);
01218 }
01219
01220 /* Store the original offset so we can update the queuing header later. */
01221 queuing_header_offset = handle_to_global_data->offset;
01222
01223 /* Read the queuing header at the beginning of the buffer. */
01224 if (-1 == handle_to_global_data->read (&queuing_header,
01225 sizeof (CMS_QUEUING_HEADER)))
01226 {
01227 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01228 BufferName, __FILE__, __LINE__);
01229 return (status = CMS_INTERNAL_ACCESS_ERROR);
01230 }
01231
01232 /* Determine amount of free space and location of next node. */
01233 if (queuing_header.tail == queuing_header.head)
01234 {
01235 if (queuing_header.queue_length == 0)
01236 {
01237 queuing_header.head = queuing_header.tail =
01238 sizeof (CMS_QUEUING_HEADER);
01239 queuing_header.queue_length = 0;
01240 queuing_header.end_queue_space = queuing_header.tail;
01241 free_space = handle_to_global_data->size
01242 - sizeof (CMS_QUEUING_HEADER) - queuing_header_offset;
01243 }
01244 else
01245 {
01246 free_space = 0;
01247 }
01248 }
01249 else if (handle_to_global_data->size - queuing_header.tail >
01250 ((long) (header.in_buffer_size + sizeof (CMS_HEADER))) &&
01251 queuing_header.tail > queuing_header.head)
01252 {
01253 free_space = handle_to_global_data->size - queuing_header.tail;
01254 }
01255 else if (queuing_header.tail < queuing_header.head)
01256 {
01257 free_space = queuing_header.tail - queuing_header.head;
01258 }
01259 else if (queuing_header.head >
01260 ((long) (queuing_header_offset + sizeof (CMS_QUEUING_HEADER) +
01261 (header.in_buffer_size + sizeof (CMS_HEADER)))))
01262 {
01263 queuing_header.end_queue_space = queuing_header.tail;
01264 queuing_header.tail = sizeof (CMS_QUEUING_HEADER);
01265 free_space =
01266 queuing_header.head - sizeof (CMS_QUEUING_HEADER) -
01267 queuing_header_offset;
01268 }
01269 else
01270 {
01271 free_space = 0;
01272 }
01273 if (cms_print_queue_free_space)
01274 {
01275 rcs_print ("queue free space = %d\n", free_space);
01276 }
01277
01278 /* Check to see if there is enough free space. */
01279 if (free_space < ((long) (header.in_buffer_size + sizeof (CMS_HEADER))))
01280 {
01281 if (cms_print_queue_free_space || cms_print_queue_full_messages)
01282 {
01283 rcs_print_error ("CMS: %s message queue is full.\n", BufferName);
01284 rcs_print_error
01285 ("(continued) CMS: Message requires %ld bytes but only %ld bytes are left.\n",
01286 header.in_buffer_size, free_space);
01287 }
01288 return (status = CMS_QUEUE_FULL);
01289 }
01290
01291 /* Store original tail so we'll know where to store the message. */
01292 original_tail = queuing_header.tail;
01293
01294 /* Update the queuing header. */
01295 queuing_header.tail += header.in_buffer_size + sizeof (CMS_HEADER);
01296 queuing_header.queue_length++;
01297 queuing_header.write_id++;
01298 if (queuing_header.end_queue_space < queuing_header.tail)
01299 {
01300 queuing_header.end_queue_space = queuing_header.tail;
01301 }
01302 if (-1 == handle_to_global_data->write (&queuing_header,
01303 sizeof (CMS_QUEUING_HEADER)))
01304 {
01305 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01306 BufferName, __FILE__, __LINE__);
01307 return (status = CMS_INTERNAL_ACCESS_ERROR);
01308 }
01309
01310 /* Setup message header. */
01311 header.write_id = queuing_header.write_id;
01312 header.was_read = 0;
01313 header.in_buffer_size = current_header.in_buffer_size;
01314
01315 /* Write the message header. */
01316 handle_to_global_data->offset += original_tail;
01317 if (-1 == handle_to_global_data->write (&header, sizeof (header)))
01318 {
01319 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01320 BufferName, __FILE__, __LINE__);
01321 return (status = CMS_INTERNAL_ACCESS_ERROR);
01322 }
01323
01324 /* Write the message. */
01325 handle_to_global_data->offset += sizeof (CMS_HEADER);
01326 if (-1 == handle_to_global_data->write (user_data,
01327 (long) header.in_buffer_size))
01328 {
01329 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01330 BufferName, __FILE__, __LINE__);
01331 return (status = CMS_INTERNAL_ACCESS_ERROR);
01332 }
01333
01334 return (status = CMS_WRITE_OK);
01335 }
|
|
|
Definition at line 1424 of file cms_in.cc. Referenced by internal_access().
01425 {
01426 CMS_HEADER current_header;
01427 long free_space;
01428 long queuing_header_offset;
01429 long original_tail;
01430
01431 /* Produce error message if process does not have permission to read. */
01432 if (!write_permission_flag)
01433
01434 {
01435 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01436 ProcessName, BufferName);
01437 return (status = CMS_PERMISSIONS_ERROR);
01438 }
01439
01440
01441 /* Store the header information to use after reading the header in the buffer. */
01442 current_header = header;
01443
01444 /* Check that the handle to the global memory object exists. */
01445 if (NULL == handle_to_global_data)
01446 {
01447 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01448 return (status = CMS_INTERNAL_ACCESS_ERROR);
01449 }
01450
01451 /* Store the original offset so we can update the queuing header later. */
01452 queuing_header_offset = handle_to_global_data->offset;
01453
01454 /* Read the queuing header at the beginning of the buffer. */
01455 if (-1 == handle_to_global_data->read (encoded_queuing_header,
01456 encoded_queuing_header_size))
01457 {
01458 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01459 BufferName, __FILE__, __LINE__);
01460 return (status = CMS_INTERNAL_ACCESS_ERROR);
01461 }
01462 /* Decode queuing header and store in queuing_header structure. */
01463 decode_queuing_header ();
01464
01465 /* Determine amount of free space and location of next node. */
01466 if (queuing_header.tail == queuing_header.head)
01467 {
01468 if (queuing_header.queue_length == 0)
01469 {
01470 queuing_header.head = queuing_header.tail =
01471 encoded_queuing_header_size;
01472 queuing_header.queue_length = 0;
01473 queuing_header.end_queue_space = queuing_header.tail;
01474 free_space = handle_to_global_data->size
01475 - encoded_queuing_header_size - queuing_header_offset;
01476 }
01477 else
01478 {
01479 free_space = 0;
01480 }
01481 }
01482 else if (handle_to_global_data->size - queuing_header.tail >
01483 header.in_buffer_size + encoded_header_size &&
01484 queuing_header.tail > queuing_header.head)
01485 {
01486 free_space = handle_to_global_data->size - queuing_header.tail;
01487 }
01488 else if (queuing_header.tail < queuing_header.head)
01489 {
01490 free_space = queuing_header.tail - queuing_header.head;
01491 }
01492 else if (queuing_header.head >
01493 encoded_header_size + queuing_header_offset +
01494 header.in_buffer_size + encoded_queuing_header_size)
01495 {
01496 queuing_header.end_queue_space = queuing_header.tail;
01497 queuing_header.tail = encoded_queuing_header_size;
01498 free_space =
01499 queuing_header.head - encoded_queuing_header_size -
01500 queuing_header_offset;
01501 }
01502 else
01503 {
01504 free_space = 0;
01505 }
01506
01507 if (cms_print_queue_free_space)
01508 {
01509 rcs_print ("queue free space = %d\n", free_space);
01510 }
01511
01512 /* Check to see if there is enough free space. */
01513 if (free_space < header.in_buffer_size + encoded_header_size)
01514 {
01515 if (cms_print_queue_free_space || cms_print_queue_full_messages)
01516 {
01517 rcs_print_error ("CMS: %s message queue is full.\n", BufferName);
01518 rcs_print_error
01519 ("(continued) CMS: Message requires %ld bytes but only %ld bytes are left.\n",
01520 header.in_buffer_size, free_space);
01521 }
01522 return (status = CMS_QUEUE_FULL);
01523 }
01524
01525 /* Store original tail so we'll know where to store the message. */
01526 original_tail = queuing_header.tail;
01527
01528 /* Update the queuing header. */
01529 queuing_header.tail += header.in_buffer_size + encoded_header_size;
01530 queuing_header.queue_length++;
01531 queuing_header.write_id++;
01532 if (queuing_header.end_queue_space < queuing_header.tail)
01533 {
01534 queuing_header.end_queue_space = queuing_header.tail;
01535 }
01536 encode_queuing_header ();
01537 if (-1 == handle_to_global_data->write (encoded_queuing_header,
01538 encoded_queuing_header_size))
01539 {
01540 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01541 BufferName, __FILE__, __LINE__);
01542 return (status = CMS_INTERNAL_ACCESS_ERROR);
01543 }
01544
01545 /* Setup message header. */
01546 header.write_id = queuing_header.write_id;
01547 header.was_read = 0;
01548 header.in_buffer_size = current_header.in_buffer_size;
01549
01550 /* Re-encode the header. */
01551 encode_header ();
01552
01553 /* Write the message header. */
01554 handle_to_global_data->offset += original_tail;
01555 if (-1 ==
01556 handle_to_global_data->write (encoded_header, encoded_header_size))
01557 {
01558 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01559 BufferName, __FILE__, __LINE__);
01560 return (status = CMS_INTERNAL_ACCESS_ERROR);
01561 }
01562
01563 /* Write the message. */
01564 handle_to_global_data->offset += encoded_header_size;
01565 if (-1 == handle_to_global_data->write (encoded_data,
01566 (long) header.in_buffer_size))
01567 {
01568 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01569 BufferName, __FILE__, __LINE__);
01570 return (status = CMS_INTERNAL_ACCESS_ERROR);
01571 }
01572
01573 return (status = CMS_WRITE_OK);
01574 }
|
|
|
Definition at line 1666 of file cms_in.cc. Referenced by internal_access().
01667 {
01668 CMS_HEADER current_header;
01669 long free_space;
01670 long queuing_header_offset;
01671 long original_tail;
01672
01673 /* Produce error message if process does not have permission to read. */
01674 if (!write_permission_flag)
01675
01676 {
01677 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01678 ProcessName, BufferName);
01679 return (status = CMS_PERMISSIONS_ERROR);
01680 }
01681
01682
01683
01684 /* Store the header information to use after reading the header in the buffer. */
01685 current_header = header;
01686
01687 /* Check that the handle to the global memory object exists. */
01688 if (NULL == handle_to_global_data)
01689 {
01690 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01691 return (status = CMS_INTERNAL_ACCESS_ERROR);
01692 }
01693
01694 /* Store the original offset so we can update the queuing header later. */
01695 queuing_header_offset = handle_to_global_data->offset;
01696
01697 /* Read the queuing header at the beginning of the buffer. */
01698 if (-1 == handle_to_global_data->read (&queuing_header,
01699 sizeof (CMS_QUEUING_HEADER)))
01700 {
01701 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01702 BufferName, __FILE__, __LINE__);
01703 return (status = CMS_INTERNAL_ACCESS_ERROR);
01704 }
01705
01706 /* Check if all the messages in the buffer have been read. */
01707 if (0 != queuing_header.queue_length)
01708 {
01709 return (status = CMS_WRITE_WAS_BLOCKED);
01710 }
01711
01712 /* Determine amount of free space and location of next node. */
01713 if (queuing_header.tail == queuing_header.head)
01714 {
01715 if (queuing_header.queue_length == 0)
01716 {
01717 queuing_header.head = queuing_header.tail =
01718 sizeof (CMS_QUEUING_HEADER);
01719 queuing_header.queue_length = 0;
01720 queuing_header.end_queue_space = queuing_header.tail;
01721 free_space = handle_to_global_data->size
01722 - sizeof (CMS_QUEUING_HEADER) - queuing_header_offset;
01723 }
01724 else
01725 {
01726 free_space = 0;
01727 }
01728 }
01729 else if (handle_to_global_data->size - queuing_header.tail >
01730 ((long) (header.in_buffer_size + sizeof (CMS_HEADER))) &&
01731 queuing_header.tail > queuing_header.head)
01732 {
01733 free_space = handle_to_global_data->size - queuing_header.tail;
01734 }
01735 else if (queuing_header.tail < queuing_header.head)
01736 {
01737 free_space = queuing_header.tail - queuing_header.head;
01738 }
01739 else if (queuing_header.head >
01740 ((long) (queuing_header_offset + sizeof (CMS_QUEUING_HEADER) +
01741 header.in_buffer_size + sizeof (CMS_HEADER))))
01742 {
01743 queuing_header.end_queue_space = queuing_header.tail;
01744 queuing_header.tail = sizeof (CMS_QUEUING_HEADER);
01745 free_space =
01746 queuing_header.head - sizeof (CMS_QUEUING_HEADER) -
01747 queuing_header_offset;
01748 }
01749 else
01750 {
01751 free_space = 0;
01752 }
01753
01754 if (cms_print_queue_free_space)
01755 {
01756 rcs_print ("queue free space = %d\n", free_space);
01757 }
01758
01759 /* Check to see if there is enough free space. */
01760 if (free_space < ((long) (header.in_buffer_size + sizeof (CMS_HEADER))))
01761 {
01762 if (cms_print_queue_free_space || cms_print_queue_full_messages)
01763 {
01764 rcs_print_error ("CMS: %s message queue is full.\n", BufferName);
01765 rcs_print_error
01766 ("(continued) CMS: Message requires %ld bytes but only %ld bytes are left.\n",
01767 header.in_buffer_size, free_space);
01768 }
01769 return (status = CMS_QUEUE_FULL);
01770 }
01771
01772 /* Store original tail so we'll know where to store the message. */
01773 original_tail = queuing_header.tail;
01774
01775 /* Update the queuing header. */
01776 queuing_header.tail += header.in_buffer_size + sizeof (CMS_HEADER);
01777 queuing_header.queue_length++;
01778 queuing_header.write_id++;
01779 if (queuing_header.end_queue_space < queuing_header.tail)
01780 {
01781 queuing_header.end_queue_space = queuing_header.tail;
01782 }
01783 if (-1 == handle_to_global_data->write (&queuing_header,
01784 sizeof (CMS_QUEUING_HEADER)))
01785 {
01786 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01787 BufferName, __FILE__, __LINE__);
01788 return (status = CMS_INTERNAL_ACCESS_ERROR);
01789 }
01790
01791 /* Setup message header. */
01792 header.write_id = queuing_header.write_id;
01793 header.was_read = 0;
01794 header.in_buffer_size = current_header.in_buffer_size;
01795
01796 /* Write the message header. */
01797 handle_to_global_data->offset += original_tail;
01798 if (-1 == handle_to_global_data->write (&header, sizeof (header)))
01799 {
01800 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01801 BufferName, __FILE__, __LINE__);
01802 return (status = CMS_INTERNAL_ACCESS_ERROR);
01803 }
01804
01805 /* Write the message. */
01806 handle_to_global_data->offset += sizeof (CMS_HEADER);
01807 if (-1 == handle_to_global_data->write (user_data,
01808 (long) header.in_buffer_size))
01809 {
01810 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
01811 BufferName, __FILE__, __LINE__);
01812 return (status = CMS_INTERNAL_ACCESS_ERROR);
01813 }
01814
01815 return (status = CMS_WRITE_OK);
01816 }
|
|
|
Definition at line 1910 of file cms_in.cc. Referenced by internal_access().
01911 {
01912 CMS_HEADER current_header;
01913 long free_space;
01914 long queuing_header_offset;
01915 long original_tail;
01916
01917 /* Produce warning message if process does not have permission to read. */
01918 if (!write_permission_flag)
01919
01920 {
01921 rcs_print_error ("CMS: %s was not configured to write to %s\n",
01922 ProcessName, BufferName);
01923 return (status = CMS_PERMISSIONS_ERROR);
01924 }
01925
01926 /* Store the header information to use after reading the header in the buffer. */
01927 current_header = header;
01928
01929 /* Check that the handle to the global memory object exists. */
01930 if (NULL == handle_to_global_data)
01931 {
01932 rcs_print_error ("CMS: handle_to_global_data is NULL.\n");
01933 return (status = CMS_INTERNAL_ACCESS_ERROR);
01934 }
01935
01936 /* Store the original offset so we can update the queuing header later. */
01937 queuing_header_offset = handle_to_global_data->offset;
01938
01939 /* Read the queuing header at the beginning of the buffer. */
01940 if (-1 == handle_to_global_data->read (encoded_queuing_header,
01941 encoded_queuing_header_size))
01942 {
01943 rcs_print_error ("CMS:(%s) Error reading from global memory at %s:%d\n",
01944 BufferName, __FILE__, __LINE__);
01945 return (status = CMS_INTERNAL_ACCESS_ERROR);
01946 }
01947 /* Decode queuing header and store in queuing_header structure. */
01948 decode_queuing_header ();
01949
01950 /* Check if all the messages in the buffer have been read. */
01951 if (0 != queuing_header.queue_length)
01952 {
01953 return (status = CMS_WRITE_WAS_BLOCKED);
01954 }
01955 /* Determine amount of free space and location of next node. */
01956 if (queuing_header.tail == queuing_header.head)
01957 {
01958 if (queuing_header.queue_length == 0)
01959 {
01960 queuing_header.head = queuing_header.tail =
01961 encoded_queuing_header_size;
01962 queuing_header.queue_length = 0;
01963 queuing_header.end_queue_space = queuing_header.tail;
01964 free_space = handle_to_global_data->size
01965 - encoded_queuing_header_size - queuing_header_offset;
01966 }
01967 else
01968 {
01969 free_space = 0;
01970 }
01971 }
01972 else if (handle_to_global_data->size - queuing_header.tail >
01973 header.in_buffer_size + encoded_header_size &&
01974 queuing_header.tail > queuing_header.head)
01975 {
01976 free_space = handle_to_global_data->size - queuing_header.tail;
01977 }
01978 else if (queuing_header.tail < queuing_header.head)
01979 {
01980 free_space = queuing_header.tail - queuing_header.head;
01981 }
01982 else if (queuing_header.head >
01983 encoded_header_size + queuing_header_offset +
01984 header.in_buffer_size + encoded_queuing_header_size)
01985 {
01986 queuing_header.end_queue_space = queuing_header.tail;
01987 queuing_header.tail = encoded_queuing_header_size;
01988 free_space =
01989 queuing_header.head - encoded_queuing_header_size -
01990 queuing_header_offset;
01991 }
01992 else
01993 {
01994 free_space = 0;
01995 }
01996
01997 if (cms_print_queue_free_space)
01998 {
01999 rcs_print ("queue free space = %d\n", free_space);
02000 }
02001
02002 /* Check to see if there is enough free space. */
02003 if (free_space < header.in_buffer_size + encoded_header_size)
02004 {
02005 if (cms_print_queue_free_space || cms_print_queue_full_messages)
02006 {
02007 rcs_print_error ("CMS: %s message queue is full.\n", BufferName);
02008 rcs_print_error
02009 ("(continued) CMS: Message requires %ld bytes but only %ld bytes are left.\n",
02010 header.in_buffer_size, free_space);
02011 }
02012 return (status = CMS_QUEUE_FULL);
02013 }
02014
02015 /* Store original tail so we'll know where to store the message. */
02016 original_tail = queuing_header.tail;
02017
02018 /* Update the queuing header. */
02019 queuing_header.tail += header.in_buffer_size + encoded_header_size;
02020 queuing_header.queue_length++;
02021 queuing_header.write_id++;
02022 if (queuing_header.end_queue_space < queuing_header.tail)
02023 {
02024 queuing_header.end_queue_space = queuing_header.tail;
02025 }
02026 encode_queuing_header ();
02027 if (-1 == handle_to_global_data->write (encoded_queuing_header,
02028 encoded_queuing_header_size))
02029 {
02030 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
02031 BufferName, __FILE__, __LINE__);
02032 return (status = CMS_INTERNAL_ACCESS_ERROR);
02033 }
02034
02035 /* Setup message header. */
02036 header.write_id = queuing_header.write_id;
02037 header.was_read = 0;
02038 header.in_buffer_size = current_header.in_buffer_size;
02039
02040 /* Re-encode the header. */
02041 encode_header ();
02042
02043 /* Write the message header. */
02044 handle_to_global_data->offset += original_tail;
02045 if (-1 ==
02046 handle_to_global_data->write (encoded_header, encoded_header_size))
02047 {
02048 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
02049 BufferName, __FILE__, __LINE__);
02050 return (status = CMS_INTERNAL_ACCESS_ERROR);
02051 }
02052
02053 /* Write the message. */
02054 handle_to_global_data->offset += encoded_header_size;
02055 if (-1 == handle_to_global_data->write (encoded_data,
02056 (long) header.in_buffer_size))
02057 {
02058 rcs_print_error ("CMS:(%s) Error writing to global memory at %s:%d\n",
02059 BufferName, __FILE__, __LINE__);
02060 return (status = CMS_INTERNAL_ACCESS_ERROR);
02061 }
02062
02063 return (status = CMS_WRITE_OK);
02064 }
|
|
|
|
|
|
Definition at line 1622 of file cms.cc. Referenced by NML_PERFORMANCE_TEST_MSG::update(), NML_QUERY_MSG::update(), ID_DELETE::update(), ID_REPLY::update(), NML_OPERATOR_REPLY::update(), NML_OPERATOR_REQUEST::update(), NML_DISPLAY::update(), NML_TEXT::update(), NML_ERROR::update(), CH3_STATUS::update(), CH2_STATUS::update(), CH1_STATUS::update(), CH3_INIT::update(), CH2_INIT::update(), CH1_INIT::update(), update(), and RCS_GENERIC_CMD::update().
01623 {
01624 if (NULL != updater)
01625 {
01626 return (updater->update (x));
01627 }
01628 else
01629 {
01630 return (status = CMS_UPDATE_ERROR);
01631 }
01632 }
|
|
|
Definition at line 1634 of file cms.cc. 01635 {
01636 if (NULL != updater)
01637 {
01638 return (updater->update (x));
01639 }
01640 else
01641 {
01642 return (status = CMS_UPDATE_ERROR);
01643 }
01644 }
|
|
|
Definition at line 1646 of file cms.cc. 01647 {
01648 if (NULL != updater)
01649 {
01650 return (updater->update (x));
01651 }
01652 else
01653 {
01654 return (status = CMS_UPDATE_ERROR);
01655 }
01656 }
|
|
|
Definition at line 1658 of file cms.cc. 01659 {
01660 if (NULL != updater)
01661 {
01662 return (updater->update (x));
01663 }
01664 else
01665 {
01666 return (status = CMS_UPDATE_ERROR);
01667 }
01668 }
|
|
|
Definition at line 1670 of file cms.cc. 01671 {
01672 if (NULL != updater)
01673 {
01674 return (updater->update (x));
01675 }
01676 else
01677 {
01678 return (status = CMS_UPDATE_ERROR);
01679 }
01680 }
|
|
|
Definition at line 1682 of file cms.cc. 01683 {
01684 if (NULL != updater)
01685 {
01686 return (updater->update (x));
01687 }
01688 else
01689 {
01690 return (status = CMS_UPDATE_ERROR);
01691 }
01692 }
|
|
|
Definition at line 1694 of file cms.cc. 01695 {
01696 if (NULL != updater)
01697 {
01698 return (updater->update (x));
01699 }
01700 else
01701 {
01702 return (status = CMS_UPDATE_ERROR);
01703 }
01704 }
|
|
|
Definition at line 1706 of file cms.cc. 01707 {
01708 if (NULL != updater)
01709 {
01710 return (updater->update (x));
01711 }
01712 else
01713 {
01714 return (status = CMS_UPDATE_ERROR);
01715 }
01716 }
|
|
|
Definition at line 1718 of file cms.cc. 01719 {
01720 if (NULL != updater)
01721 {
01722 return (updater->update (x));
01723 }
01724 else
01725 {
01726 return (status = CMS_UPDATE_ERROR);
01727 }
01728 }
|
|
|
Definition at line 1730 of file cms.cc. 01731 {
01732 if (NULL != updater)
01733 {
01734 return (updater->update (x));
01735 }
01736 else
01737 {
01738 return (status = CMS_UPDATE_ERROR);
01739 }
01740 }
|
|
|
Definition at line 1742 of file cms.cc. 01743 {
01744 if (NULL != updater)
01745 {
01746 return (updater->update (x));
01747 }
01748 else
01749 {
01750 return (status = CMS_UPDATE_ERROR);
01751 }
01752 }
|
|
||||||||||||
|
Definition at line 1754 of file cms.cc. 01755 {
01756 if (NULL != updater)
01757 {
01758 return (updater->update (x, len));
01759 }
01760 else
01761 {
01762 return (status = CMS_UPDATE_ERROR);
01763 }
01764 }
|
|
||||||||||||
|
Definition at line 1766 of file cms.cc. 01767 {
01768 if (NULL != updater)
01769 {
01770 return (updater->update (x, len));
01771 }
01772 else
01773 {
01774 return (status = CMS_UPDATE_ERROR);
01775 }
01776 }
|
|
||||||||||||
|
Definition at line 1778 of file cms.cc. 01779 {
01780 if (NULL != updater)
01781 {
01782 return (updater->update (x, len));
01783 }
01784 else
01785 {
01786 return (status = CMS_UPDATE_ERROR);
01787 }
01788 }
|
|
||||||||||||
|
Definition at line 1790 of file cms.cc. 01791 {
01792 if (NULL != updater)
01793 {
01794 return (updater->update (x, len));
01795 }
01796 else
01797 {
01798 return (status = CMS_UPDATE_ERROR);
01799 }
01800 }
|
|
||||||||||||
|
Definition at line 1802 of file cms.cc. 01803 {
01804 if (NULL != updater)
01805 {
01806 return (updater->update (x, len));
01807 }
01808 else
01809 {
01810 return (status = CMS_UPDATE_ERROR);
01811 }
01812 }
|
|
||||||||||||
|
Definition at line 1814 of file cms.cc. 01815 {
01816 if (NULL != updater)
01817 {
01818 return (updater->update (x, len));
01819 }
01820 else
01821 {
01822 return (status = CMS_UPDATE_ERROR);
01823 }
01824 }
|
|
||||||||||||
|
Definition at line 1826 of file cms.cc. 01827 {
01828 if (NULL != updater)
01829 {
01830 return (updater->update (x, len));
01831 }
01832 else
01833 {
01834 return (status = CMS_UPDATE_ERROR);
01835 }
01836 }
|
|
||||||||||||
|
Definition at line 1838 of file cms.cc. 01839 {
01840 if (NULL != updater)
01841 {
01842 return (updater->update (x, len));
01843 }
01844 else
01845 {
01846 return (status = CMS_UPDATE_ERROR);
01847 }
01848 }
|
|
||||||||||||
|
Definition at line 1850 of file cms.cc. 01851 {
01852 if (NULL != updater)
01853 {
01854 return (updater->update (x, len));
01855 }
01856 else
01857 {
01858 return (status = CMS_UPDATE_ERROR);
01859 }
01860 }
|
|
||||||||||||
|
Definition at line 1862 of file cms.cc. 01863 {
01864 if (NULL != updater)
01865 {
01866 return (updater->update (x, len));
01867 }
01868 else
01869 {
01870 return (status = CMS_UPDATE_ERROR);
01871 }
01872 }
|
|
||||||||||||
|
Definition at line 1874 of file cms.cc. 01875 {
01876 if (NULL != updater)
01877 {
01878 return (updater->update (x, len));
01879 }
01880 else
01881 {
01882 return (status = CMS_UPDATE_ERROR);
01883 }
01884 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Definition at line 20 of file cms_pm.cc. 00021 {
00022 int i;
00023 for (i = 0; i < n; i++)
00024 {
00025 update (x[i]);
00026 }
00027 return (status);
00028 }
|
|
||||||||||||
|
Definition at line 40 of file cms_pm.cc. 00041 {
00042 int i;
00043 for (i = 0; i < n; i++)
00044 {
00045 update (x[i]);
00046 }
00047 return (status);
00048 }
|
|
||||||||||||
|
Definition at line 60 of file cms_pm.cc. 00061 {
00062 int i;
00063 for (i = 0; i < n; i++)
00064 {
00065 update (x[i]);
00066 }
00067 return (status);
00068 }
|
|
||||||||||||
|
Definition at line 82 of file cms_pm.cc. 00083 {
00084 int i;
00085 for (i = 0; i < n; i++)
00086 {
00087 update (x[i]);
00088 }
00089 return (status);
00090 }
|
|
||||||||||||
|
Definition at line 104 of file cms_pm.cc. 00105 {
00106 int i;
00107 for (i = 0; i < n; i++)
00108 {
00109 update (x[i]);
00110 }
00111 return (status);
00112 }
|
|
||||||||||||
|
Definition at line 125 of file cms_pm.cc. 00126 {
00127 int i;
00128 for (i = 0; i < n; i++)
00129 {
00130 update (x[i]);
00131 }
00132 return (status);
00133 }
|
|
||||||||||||
|
Definition at line 146 of file cms_pm.cc. 00147 {
00148 int i;
00149 for (i = 0; i < n; i++)
00150 {
00151 update (x[i]);
00152 }
00153 return (status);
00154 }
|
|
||||||||||||
|
Definition at line 167 of file cms_pm.cc. 00168 {
00169 int i;
00170 for (i = 0; i < n; i++)
00171 {
00172 update (x[i]);
00173 }
00174 return (status);
00175 }
|
|
||||||||||||
|
Definition at line 187 of file cms_pm.cc. 00188 {
00189 int i;
00190 for (i = 0; i < n; i++)
00191 {
00192 update (x[i]);
00193 }
00194 return (status);
00195 }
|
|
||||||||||||
|
Definition at line 207 of file cms_pm.cc. 00208 {
00209 int i;
00210 for (i = 0; i < n; i++)
00211 {
00212 update (x[i]);
00213 }
00214 return (status);
00215 }
|
|
||||||||||||
|
Definition at line 227 of file cms_pm.cc. 00228 {
00229 int i;
00230 for (i = 0; i < n; i++)
00231 {
00232 update (x[i]);
00233 }
00234 return (status);
00235 }
|
|
|
Definition at line 1616 of file cms.cc. 01617 {
01618 status = new_status;
01619 }
|
|
||||||||||||
|
Definition at line 1062 of file cms.cc. 01063 {
01064 if (force_raw)
01065 {
01066 if (NULL != data && data != _encoded_data)
01067 {
01068 DEBUG_FREE (data);
01069 }
01070 data = encoded_data = _encoded_data;
01071 encoded_data_size = size;
01072 subdiv_data = data;
01073 using_external_encoded_data = 1;
01074 }
01075 else
01076 {
01077 if (max_encoded_message_size > _encoded_data_size)
01078 {
01079 max_encoded_message_size = _encoded_data_size;
01080 }
01081 if (NULL != updater)
01082 {
01083 updater->set_encoded_data (_encoded_data, _encoded_data_size);
01084 }
01085 if (NULL != _encoded_data)
01086 {
01087 memset (_encoded_data, 0, max_encoded_message_size);
01088 }
01089 using_external_encoded_data = 1;
01090 }
01091 }
|
|
||||||||||||
|
Definition at line 1592 of file cms.cc. Referenced by CMS_UPDATER::check_pointer().
01593 {
01594 if (force_raw)
01595 {
01596 return 0;
01597 }
01598 if (NULL == format_low_ptr || NULL == format_high_ptr
01599 || pointer_check_disabled)
01600 {
01601 return 0;
01602 }
01603 if (ptr < format_low_ptr || ptr > (format_high_ptr - bytes))
01604 {
01605 rcs_print_error ("CMS: pointer %p to %d bytes out of range %p to %p\n",
01606 ptr, bytes, format_low_ptr, format_high_ptr);
01607 rcs_print_error ("CMS: Check buffer and message sizes.\n");
01608 status = CMS_UPDATE_ERROR;
01609 return -1;
01610 }
01611 format_size = (long) (ptr - format_low_ptr) + bytes;
01612 return 0;
01613 }
|
|
|
Definition at line 1453 of file cms.cc. Referenced by open(), queue_read_encoded(), queue_write_encoded(), queue_write_if_read_encoded(), read_encoded(), write_encoded(), and write_if_read_encoded().
01454 {
01455 if (force_raw)
01456 {
01457 return 0;
01458 }
01459 if (NULL == updater)
01460 {
01461 return -1;
01462 }
01463 CMS_UPDATER_MODE original_mode;
01464 original_mode = updater->get_mode ();
01465 format_low_ptr = (char RCS_HUGE *) &header;
01466 format_high_ptr = ((char RCS_HUGE *) &header) + sizeof (CMS_HEADER);
01467 updater->set_mode (CMS_ENCODE_HEADER);
01468 updater->rewind ();
01469 updater->update (header.was_read);
01470 updater->update (header.write_id);
01471 updater->update (header.in_buffer_size);
01472 if (status == CMS_UPDATE_ERROR || status == CMS_MISC_ERROR)
01473 {
01474 return (-1);
01475 }
01476 encoded_header_size = updater->get_encoded_msg_size ();
01477 if (min_compatible_version <= 0.0 || min_compatible_version > 3.29)
01478 {
01479 if (neutral_encoding_method == CMS_DISPLAY_ASCII_ENCODING)
01480 {
01481 encoded_header_size = 16;
01482 }
01483 }
01484 updater->set_mode (original_mode);
01485 return (encoded_header_size);
01486 }
|
|
|
Definition at line 1489 of file cms.cc. Referenced by check_if_read_encoded(), peek_encoded(), queue_peek_encoded(), queue_read_encoded(), read_encoded(), write_encoded(), and write_if_read_encoded().
01490 {
01491 if (force_raw)
01492 {
01493 return 0;
01494 }
01495 if (NULL == updater)
01496 {
01497 return -1;
01498 }
01499 CMS_UPDATER_MODE original_mode = updater->get_mode ();
01500 format_low_ptr = (char RCS_HUGE *) &header;
01501 format_high_ptr = ((char RCS_HUGE *) &header) + sizeof (CMS_HEADER);
01502 updater->set_mode (CMS_DECODE_HEADER);
01503 updater->rewind ();
01504 updater->update (header.was_read);
01505 updater->update (header.write_id);
01506 updater->update (header.in_buffer_size);
01507 updater->set_mode (original_mode);
01508 return ((int) (status != CMS_UPDATE_ERROR && status != CMS_MISC_ERROR) ? 0 :
01509 -1);
01510 }
|
|
|
Definition at line 1513 of file cms.cc. Referenced by open(), queue_read_encoded(), queue_write_encoded(), and queue_write_if_read_encoded().
01514 {
01515 if (force_raw)
01516 {
01517 return 0;
01518 }
01519 if (NULL == updater)
01520 {
01521 return -1;
01522 }
01523 CMS_UPDATER_MODE original_mode = updater->get_mode ();
01524 format_low_ptr = (char RCS_HUGE *) &queuing_header;
01525 format_high_ptr =
01526 ((char RCS_HUGE *) &queuing_header) + sizeof (CMS_QUEUING_HEADER);
01527 updater->set_mode (CMS_ENCODE_QUEUING_HEADER);
01528 updater->rewind ();
01529 updater->update (queuing_header.head);
01530 updater->update (queuing_header.tail);
01531 updater->update (queuing_header.queue_length);
01532 updater->update (queuing_header.end_queue_space);
01533 updater->update (queuing_header.write_id);
01534 if (status == CMS_UPDATE_ERROR || status == CMS_MISC_ERROR)
01535 {
01536 return (-1);
01537 }
01538 encoded_queuing_header_size = updater->get_encoded_msg_size ();
01539 if (min_compatible_version <= 0.0 || min_compatible_version > 3.29)
01540 {
01541 if (neutral_encoding_method == CMS_DISPLAY_ASCII_ENCODING)
01542 {
01543 encoded_queuing_header_size = 24;
01544 }
01545 }
01546 updater->set_mode (original_mode);
01547 return (encoded_queuing_header_size);
01548 }
|
|
|
Definition at line 1551 of file cms.cc. Referenced by queue_check_if_read_encoded(), queue_peek_encoded(), queue_read_encoded(), queue_write_encoded(), and queue_write_if_read_encoded().
01552 {
01553 if (force_raw)
01554 {
01555 return 0;
01556 }
01557 if (NULL == updater)
01558 {
01559 return -1;
01560 }
01561 CMS_UPDATER_MODE original_mode = updater->get_mode ();
01562 format_low_ptr = (char RCS_HUGE *) &queuing_header;
01563 format_high_ptr =
01564 ((char RCS_HUGE *) &queuing_header) + sizeof (CMS_QUEUING_HEADER);
01565 updater->set_mode (CMS_DECODE_QUEUING_HEADER);
01566 updater->rewind ();
01567 updater->update (queuing_header.head);
01568 updater->update (queuing_header.tail);
01569 updater->update (queuing_header.queue_length);
01570 updater->update (queuing_header.end_queue_space);
01571 updater->update (queuing_header.write_id);
01572 updater->set_mode (original_mode);
01573 return ((int) (status != CMS_UPDATE_ERROR && status != CMS_MISC_ERROR) ? 0 :
01574 -1);
01575 }
|
|
|
Definition at line 1148 of file cms.cc. Referenced by UDPMEM::blocking_read(), TCPMEM::blocking_read(), UDPMEM::peek(), TTYMEM::peek(), TCPMEM::peek(), STCPMEM::peek(), RPCMEM::peek(), peek_encoded(), peek_raw(), queue_peek_encoded(), queue_peek_raw(), queue_read_encoded(), queue_read_raw(), UDPMEM::read(), TTYMEM::read(), TCPMEM::read(), STCPMEM::read(), RPCMEM::read(), read_encoded(), and read_raw().
01149 {
01150 if (status < 0)
01151 {
01152 return (status);
01153 }
01154
01155
01156 if (0 == id)
01157 {
01158 messages_missed_on_last_read = 0;
01159 in_buffer_id = 0;
01160 return (status = CMS_READ_OLD);
01161 }
01162
01163
01164 if (id == in_buffer_id)
01165 {
01166 status = CMS_READ_OLD;
01167 messages_missed_on_last_read = 0;
01168 }
01169 else
01170 {
01171 if (split_buffer)
01172 {
01173 if (id == last_id_side0 || id == last_id_side1)
01174 {
01175 status = CMS_READ_OLD;
01176 messages_missed_on_last_read = 0;
01177 return (status);
01178 }
01179 if (toggle_bit)
01180 {
01181 last_id_side0 = id;
01182 }
01183 else
01184 {
01185 last_id_side1 = id;
01186 }
01187 }
01188 status = CMS_READ_OK;
01189 messages_missed_on_last_read = id - in_buffer_id - 1;
01190 if (messages_missed_on_last_read < 0)
01191 {
01192 messages_missed_on_last_read = 0;
01193 }
01194 total_messages_missed += messages_missed_on_last_read;
01195 in_buffer_id = id;
01196 }
01197 return (status);
01198 }
|
|
|
Reimplemented in RPCMEM, and SHMEM. Definition at line 799 of file cms.cc. Referenced by CMS().
00800 {
00801 int encode_header_ret;
00802 int encode_queuing_header_ret;
00803
00804 /* Clear some status checking variables. */
00805 status = CMS_STATUS_NOT_SET;
00806
00807 /* Set all the pointers to null before requesting memory so that we only */
00808 /* free successfully allocated memory. */
00809 data = NULL;
00810 subdiv_data = NULL;
00811 encoded_data = NULL;
00812 encoded_header = NULL;
00813 encoded_queuing_header = NULL;
00814 encoded_header_size = 0;
00815 updater = (CMS_UPDATER *) NULL;
00816 normal_updater = (CMS_UPDATER *) NULL;
00817 temp_updater = (CMS_UPDATER *) NULL;
00818 last_im = CMS_NOT_A_MODE;
00819 pointer_check_disabled = 0;
00820
00821 dummy_handle = (PHYSMEM_HANDLE *) NULL;
00822
00823 /* Initialize some debug variables. */
00824 first_read_done = 0;
00825 first_write_done = 0;
00826 total_messages_missed = 0;
00827 messages_missed_on_last_read = 0;
00828 format_low_ptr = (char *) NULL;
00829 format_high_ptr = (char *) NULL;
00830 header.was_read = 0;
00831 header.write_id = 0;
00832 header.in_buffer_size = 0;
00833 sizeof_message_header = 0;
00834
00835 number_of_cms_objects++; /* Increment the static variable. */
00836 /* Save some memory and time if this is a PHANTOMMEM object. */
00837 if (!is_phantom)
00838 {
00839 /* Allocate memory for the local copy of global buffer. */
00840 data = DEBUG_MALLOC (size);
00841 memset (data, 0, size);
00842 subdiv_data = data;
00843 if (force_raw)
00844 {
00845 encoded_data = data;
00846 }
00847 rcs_print_debug (PRINT_CMS_CONSTRUCTORS, "%X = data = calloc(%d,1);\n",
00848 data, size);
00849 /* Check to see if allocating memory was successful. */
00850 if (data == NULL)
00851 {
00852 rcs_print_error ("CMS: Can't allocate memory for local buffer.\n");
00853 status = CMS_CREATE_ERROR;
00854 return;
00855 }
00856 }
00857 if (isserver || neutral || ProcessType == CMS_REMOTE_TYPE && !force_raw)
00858 {
00859 switch (neutral_encoding_method)
00860 {
00861 case CMS_XDR_ENCODING:
00862 updater = new CMS_XDR_UPDATER (this);
00863 break;
00864
00865 #ifndef UNDER_CE
00866 case CMS_ASCII_ENCODING:
00867 updater = new CMS_ASCII_UPDATER (this);
00868 break;
00869
00870 case CMS_DISPLAY_ASCII_ENCODING:
00871 updater = new CMS_DISPLAY_ASCII_UPDATER (this);
00872 break;
00873 #endif
00874
00875 default:
00876 updater = (CMS_UPDATER *) NULL;
00877 status = CMS_UPDATE_ERROR;
00878 rcs_print_error ("CMS: Invalid encoding method(%d)\n",
00879 neutral_encoding_method);
00880 break;
00881 }
00882 normal_updater = updater;
00883 if (((int) status) < 0)
00884 {
00885 return;
00886 }
00887 /* Find out what size the header is after it has been encoded. */
00888 if ((encode_header_ret = encode_header ()) == -1)
00889 {
00890 rcs_print_error ("CMS:Error encoding CMS header.\n");
00891 status = CMS_MISC_ERROR;
00892 return;
00893 }
00894 encoded_header_size = (long) encode_header_ret;
00895 if (min_compatible_version <= 0.0 || min_compatible_version > 3.29)
00896 {
00897 if (neutral_encoding_method == CMS_DISPLAY_ASCII_ENCODING)
00898 {
00899 encoded_header_size = 16;
00900 }
00901 }
00902
00903 if (queuing_enabled)
00904 {
00905 /* Initialize queuing header to avoid test center error message. */
00906 memset (&queuing_header, 0, sizeof (queuing_header));
00907
00908 /* Find out what size the queuing_header is after being encoded. */
00909 if ((encode_queuing_header_ret = encode_queuing_header ()) == -1)
00910 {
00911 rcs_print_error ("CMS:Error encoding CMS queuing_header.\n");
00912 status = CMS_MISC_ERROR;
00913 return;
00914 }
00915 encoded_queuing_header_size = (long) encode_queuing_header_ret;
00916 }
00917 }
00918
00919 if (split_buffer && total_subdivisions > 1)
00920 {
00921 rcs_print_error
00922 ("Can't split buffer and use subdivisions. (total_subsivisions=%d)",
00923 total_subdivisions);
00924 status = CMS_MISC_ERROR;
00925 return;
00926 }
00927
00928 int nfactor = 4;
00929 if (NULL != updater)
00930 {
00931 nfactor = updater->neutral_size_factor;
00932 }
00933
00934 /* Set some varaibles to let the user know how much space is left. */
00935 size_without_diagnostics = size;
00936 diag_offset = 0;
00937 if (enable_diagnostics)
00938 {
00939 diag_offset = (sizeof (CMS_DIAG_HEADER) +
00940 (total_connections * sizeof (CMS_DIAG_PROC_INFO)));
00941 size_without_diagnostics -= diag_offset;
00942 }
00943 skip_area = 0;
00944 half_offset = (size_without_diagnostics / 2);
00945 half_size = (size_without_diagnostics / 2);
00946 fast_mode = 0;
00947 if (split_buffer)
00948 {
00949 if (neutral)
00950 {
00951 subdiv_size = (size_without_diagnostics / 2) - total_connections;
00952 subdiv_size -= (subdiv_size % 4);
00953 max_message_size =
00954 (size_without_diagnostics / 2) - total_connections -
00955 encoded_header_size - 2;
00956 max_encoded_message_size =
00957 size_without_diagnostics - total_connections -
00958 encoded_header_size;
00959 guaranteed_message_space =
00960 max_message_size / cms_encoded_data_explosion_factor;
00961 }
00962 else
00963 {
00964 if (ProcessType == CMS_REMOTE_TYPE)
00965 {
00966 subdiv_size =
00967 (size_without_diagnostics / 2) - total_connections;
00968 subdiv_size -= (subdiv_size % 4);
00969 max_message_size =
00970 (size_without_diagnostics / 2) - total_connections -
00971 sizeof (CMS_HEADER) - 2;
00972 max_encoded_message_size = nfactor * max_message_size;
00973 guaranteed_message_space = max_message_size / nfactor;
00974 }
00975 else
00976 {
00977 subdiv_size =
00978 (size_without_diagnostics / 2) - total_connections;
00979 subdiv_size -= (subdiv_size % 4);
00980 max_message_size =
00981 (size_without_diagnostics / 2) - total_connections -
00982 sizeof (CMS_HEADER) - 2;
00983 max_encoded_message_size = nfactor * max_message_size;
00984 guaranteed_message_space = max_message_size;
00985 }
00986 }
00987 }
00988 else
00989 {
00990 if (neutral)
00991 {
00992 subdiv_size =
00993 (size_without_diagnostics -
00994 total_connections) / total_subdivisions;
00995 subdiv_size -= (subdiv_size % 4);
00996 max_message_size = subdiv_size - encoded_header_size;
00997 max_encoded_message_size = subdiv_size - encoded_header_size;
00998 guaranteed_message_space = max_message_size / nfactor;
00999 }
01000 else
01001 {
01002 if (ProcessType == CMS_REMOTE_TYPE)
01003 {
01004 subdiv_size =
01005 (size_without_diagnostics -
01006 total_connections) / total_subdivisions;
01007 subdiv_size -= (subdiv_size % 4);
01008 max_message_size = subdiv_size - sizeof (CMS_HEADER);
01009 max_encoded_message_size = nfactor * max_message_size;
01010 guaranteed_message_space = max_message_size / nfactor;
01011 }
01012 else
01013 {
01014 subdiv_size =
01015 (size_without_diagnostics -
01016 total_connections) / total_subdivisions;
01017 subdiv_size -= (subdiv_size % 4);
01018 max_message_size = subdiv_size - sizeof (CMS_HEADER);
01019 max_encoded_message_size = nfactor * max_message_size;
01020 guaranteed_message_space = max_message_size;
01021 }
01022 }
01023 }
01024 if (enc_max_size > 0 && enc_max_size < max_encoded_message_size)
01025 {
01026 max_encoded_message_size = enc_max_size;
01027 }
01028
01029 if ((neutral || ProcessType == CMS_REMOTE_TYPE) && !isserver)
01030 {
01031 /* Local processes that are use a neutral buffer and */
01032 /* All remote processes. */
01033 read_mode = CMS_DECODE;
01034 read_updater_mode = CMS_DECODE_DATA;
01035 write_mode = CMS_ENCODE;
01036 write_updater_mode = CMS_ENCODE_DATA;
01037 }
01038 else if (!neutral && isserver && !force_raw)
01039 {
01040 /* Servers. */
01041 read_mode = CMS_ENCODE;
01042 read_updater_mode = CMS_ENCODE_DATA;
01043 write_mode = CMS_DECODE;
01044 write_updater_mode = CMS_DECODE_DATA;
01045 }
01046 else
01047 {
01048 /* Everybody else. */
01049 read_mode = CMS_RAW_OUT;
01050 read_updater_mode = CMS_NO_UPDATE;
01051 write_mode = CMS_RAW_IN;
01052 write_updater_mode = CMS_NO_UPDATE;
01053 }
01054 }
|
|
|
Definition at line 1887 of file cms.cc. Referenced by cms_create().
01888 {
01889 switch (status_type)
01890 {
01891 /* ERROR conditions */
01892 case CMS_MISC_ERROR:
01893 return ("CMS_MISC_ERROR: A miscellaneous error occured.");
01894
01895 case CMS_UPDATE_ERROR:
01896 return ("CMS_UPDATE_ERROR: An error occured during an update. ");
01897
01898 case CMS_INTERNAL_ACCESS_ERROR:
01899 return
01900 ("CMS_INTERNAL_ACCESS_ERROR: An error occured during an internal access function. ");
01901
01902 case CMS_NO_MASTER_ERROR:
01903 return
01904 ("CMS_NO_MASTER_ERROR: An error occured becouse the master was not started.");
01905
01906 case CMS_CONFIG_ERROR:
01907 return ("CMS_CONFIG_ERROR: There was an error in the configuration.");
01908
01909 case CMS_TIMED_OUT:
01910 return ("CMS_TIMED_OUT: operation timed out.");
01911
01912 case CMS_QUEUE_FULL:
01913 return
01914 ("CMS_QUEUE_FULL:= A write failed because queuing was enabled but there was no room to add to the queue. ");
01915
01916 case CMS_CREATE_ERROR:
01917 return
01918 ("CMS_CREATE_ERROR: Something could not be created because we were out of memory or another system resource.");
01919
01920 case CMS_PERMISSIONS_ERROR:
01921 return ("CMS_PERMISSIONS_ERROR: Problem with permissions.");
01922
01923 /* NON Error Conditions. */
01924 case CMS_STATUS_NOT_SET:
01925 return
01926 ("CMS_STATUS_NOT_SET: The status variable has not been set yet.");
01927
01928 case CMS_READ_OLD:
01929 return ("CMS_READ_OLD: Read successful, but data is old. \n");
01930
01931 case CMS_READ_OK:
01932 return ("CMS_READ_OK: Read successful so far.");
01933
01934 case CMS_WRITE_OK:
01935 return ("CMS_WRITE_OK: Write successful so far. ");
01936
01937 case CMS_WRITE_WAS_BLOCKED:
01938 return
01939 ("CMS_WRITE_WAS_BLOCKED: Write if read did not succeed, because the buffer had not been read yet.");
01940
01941 case CMS_CLEAR_OK:
01942 return ("CMS_CLEAR_OK: A clear operation was successful.");
01943
01944 case CMS_CLOSED:
01945 return ("CMS_CLOSED: The channel has been closed.");
01946
01947 case CMS_NO_SERVER_ERROR:
01948 return
01949 (" CMS_NO_SERVER_ERROR: The server has not been started or could not be contacted.");
01950
01951 case CMS_RESOURCE_CONFLICT_ERROR:
01952 return
01953 ("CMS_RESOURCE_CONFLICT_ERROR: Two or more CMS buffers are trying to use the same resource.");
01954
01955 case CMS_NO_IMPLEMENTATION_ERROR:
01956 return
01957 ("CMS_NO_IMPLEMENTATION_ERROR: An operation was attempted which has not yet been implemented for the current platform or protocol.");
01958
01959 case CMS_INSUFFICIENT_SPACE_ERROR:
01960 return
01961 ("CMS_INSUFFICIENT_SPACE_ERROR: The size of the buffer was insufficient for the requested operation.");
01962
01963 case CMS_LIBRARY_UNAVAILABLE_ERROR:
01964 return
01965 ("CMS_LIBRARY_UNAVAILABLE_ERROR: A DLL or Shared Object library needed for the current protocol could not be found or initialized.");
01966
01967 case CMS_SERVER_SIDE_ERROR:
01968 return ("CMS_SERVER_SIDE_ERROR: The server reported an error.");
01969
01970 case CMS_NO_BLOCKING_SEM_ERROR:
01971 return
01972 ("CMS_NO_BLOCKING_SEM_ERROR: A blocking_read operartion was tried but no semaphore for the blocking was configured or available.");
01973
01974 default:
01975 return ("UNKNOWN");
01976 }
01977 }
|
|
|
Definition at line 1981 of file cms.cc. 01982 {
01983 if (_subdiv < 0 || _subdiv > total_subdivisions)
01984 {
01985 return -1;
01986 }
01987 current_subdivision = _subdiv;
01988 subdiv_data = ((char *) data) + _subdiv * (subdiv_size);
01989 return (0);
01990 }
|
|
|
Definition at line 62 of file cmsdiag.cc. 00063 {
00064 return dpi;
00065 }
|
|
|
Definition at line 68 of file cmsdiag.cc. 00069 {
00070 dpi = _dpi;
00071 }
|
|
|
Definition at line 78 of file cmsdiag.cc. Referenced by CMS().
00079 {
00080 first_diag_store = 1;
00081 if (NULL == dpi)
00082 {
00083 dpi = new CMS_DIAG_PROC_INFO ();
00084 }
00085 strncpy (dpi->name, ProcessName, 16); // process name
00086 int sysinfo_len = 0;
00087 memset (dpi->host_sysinfo, 0, 32);
00088 #ifdef HAVE_GETHOSTNAME
00089 #ifdef WIN32
00090 load_socket_interface ();
00091 #endif
00092 gethostname (dpi->host_sysinfo, 31);
00093 sysinfo_len += strlen (dpi->host_sysinfo);
00094 dpi->host_sysinfo[sysinfo_len++] = ',';
00095 dpi->host_sysinfo[sysinfo_len++] = ' ';
00096 #endif
00097
00098 #ifdef WIN32
00099 char *wvptr = winver ();
00100 if (NULL != wvptr)
00101 {
00102 strncpy (dpi->host_sysinfo + sysinfo_len, wvptr, 31 - sysinfo_len);
00103 sysinfo_len += strlen (dpi->host_sysinfo + sysinfo_len);
00104 }
00105 #endif
00106 #ifdef HAVE_SYSINFO
00107 if (sysinfo_len < 31)
00108 {
00109 sysinfo (SI_SYSNAME, dpi->host_sysinfo + sysinfo_len, 31 - sysinfo_len);
00110 sysinfo_len += strlen (dpi->host_sysinfo + sysinfo_len);
00111 }
00112 if (sysinfo_len < 31)
00113 {
00114 dpi->host_sysinfo[sysinfo_len++] = ' ';
00115 sysinfo (SI_RELEASE, dpi->host_sysinfo + sysinfo_len, 31 - sysinfo_len);
00116 sysinfo_len += strlen (dpi->host_sysinfo + sysinfo_len);
00117 }
00118 if (sysinfo_len < 31)
00119 {
00120 dpi->host_sysinfo[sysinfo_len++] = ',';
00121 sysinfo (SI_PLATFORM, dpi->host_sysinfo + sysinfo_len,
00122 31 - sysinfo_len);
00123 }
00124 #endif
00125 #ifdef VXWORKS
00126 if (sysinfo_len < 31)
00127 {
00128 char *modelname = sysModel ();
00129 if (NULL != modelname)
00130 {
00131 strncpy (dpi->host_sysinfo + sysinfo_len, modelname,
00132 31 - sysinfo_len);
00133 sysinfo_len += strlen (modelname);
00134 dpi->host_sysinfo[31] = 0;
00135 }
00136 }
00137 if (sysinfo_len < 31)
00138 {
00139 dpi->host_sysinfo[sysinfo_len++] = ',';
00140 }
00141 if (sysinfo_len < 31)
00142 {
00143 char *BspRevname = "VxWorks";
00144 if (NULL != BspRevname)
00145 {
00146 strncpy (dpi->host_sysinfo + sysinfo_len, BspRevname,
00147 31 - sysinfo_len);
00148 sysinfo_len += strlen (BspRevname);
00149 dpi->host_sysinfo[31] = 0;
00150 }
00151 }
00152 #endif
00153
00154
00155 // Version of the rcslib used by this component.
00156 if (rcs_minor_version_number < 100)
00157 {
00158 dpi->rcslib_ver =
00159 (rcs_major_version_number + (rcs_minor_version_number * 1e-2));
00160 }
00161 else
00162 {
00163 dpi->rcslib_ver =
00164 (rcs_major_version_number + (rcs_minor_version_number * 1e-3));
00165 }
00166
00167 #ifdef WIN32
00168 dpi->pid = GetCurrentProcessId (); /* Process, Thread or Task Id. */
00169 #else
00170 #ifdef VXWORKS
00171 dpi->pid = taskIdSelf ();
00172 #else
00173 dpi->pid = getpid ();
00174 #endif
00175 #endif
00176
00177 dpi->access_type = CMS_ZERO_ACCESS; // access type of last operation
00178 dpi->msg_id = 0; // id of the message written or at time of read.
00179 dpi->msg_size = 0; // size of the message written or at time of read.
00180 dpi->msg_type = 0; // id of the message written or at time of read.
00181
00182 dpi->number_of_accesses = 0;
00183 dpi->number_of_new_messages = 0;
00184 dpi->bytes_moved = 0;
00185 dpi->last_access_time = 0;
00186 dpi->first_access_time = 0;
00187 dpi->max_difference = 0;
00188 dpi->min_difference = 0;
00189 first_diag_store = 1;
00190 #ifndef VXWORKS
00191 if (!cmsdiag_timebias_set)
00192 {
00193 cmsdiag_timebias_set = 1;
00194 time_t ttime = time (NULL);
00195 cmsdiag_timebias = floor (etime () - ttime);
00196 }
00197 #endif
00198 }
|
|
||||||||||||
|
Definition at line 201 of file cmsdiag.cc. Referenced by internal_access().
00203 {
00204 double cmsdiag_curtime = 0.0;
00205 if (NULL == dpi || _handle == NULL || !enable_diagnostics)
00206 {
00207 return;
00208 }
00209 long orig_offset = _handle->offset;
00210 CMS_DIAG_HEADER dh;
00211
00212 _handle->enable_byte_counting = 0;
00213 _handle->read (&dh, sizeof (CMS_DIAG_HEADER));
00214 if (connection_number == 0 && first_diag_store && dh.last_writer == 0)
00215 {
00216 dh.last_writer = -1;
00217 }
00218 if (connection_number == 0 && first_diag_store && dh.last_reader == 0)
00219 {
00220 dh.last_reader = -1;
00221 }
00222 if (internal_access_type == CMS_WRITE_ACCESS ||
00223 internal_access_type == CMS_WRITE_IF_READ_ACCESS)
00224 {
00225 dh.last_writer = connection_number;
00226 }
00227 else if (internal_access_type == CMS_READ_ACCESS)
00228 {
00229 dh.last_reader = connection_number;
00230 }
00231 _handle->write (&dh, sizeof (CMS_DIAG_HEADER));
00232 _handle->offset += sizeof (CMS_DIAG_HEADER);
00233 _handle->offset += (connection_number * sizeof (CMS_DIAG_PROC_INFO));
00234 char c;
00235 _handle->read (&c, 1);
00236 first_diag_store |= ((c != ProcessName[0] && c != dpi->name[0]) || c == 0);
00237 if (!first_diag_store)
00238 {
00239 _handle->read (dpi, sizeof (CMS_DIAG_PROC_INFO));
00240 }
00241 dpi->access_type = internal_access_type; // access type of last operation
00242 dpi->msg_id = header.write_id; // id of the message written or at time of read.
00243 dpi->msg_size = header.in_buffer_size;
00244 if (internal_access_type == CMS_WRITE_ACCESS ||
00245 internal_access_type == CMS_WRITE_IF_READ_ACCESS)
00246 {
00247 if (NULL != _user_data)
00248 {
00249 dpi->msg_type = *((long *) _user_data); // id of the message written or at time of read.
00250 }
00251 }
00252 else
00253 {
00254 if (NULL != subdiv_data)
00255 {
00256 dpi->msg_type = *((long *) subdiv_data); // id of the message written or at time of read.
00257 }
00258 }
00259 if (!disable_diag_store)
00260 {
00261 dpi->number_of_accesses++;
00262 }
00263 if (dpi->number_of_accesses < 1)
00264 {
00265 dpi->number_of_accesses = 1;
00266 dpi->number_of_new_messages = 1;
00267 _handle->total_bytes_moved = 0;
00268 pre_op_total_bytes_moved = 0;
00269 first_diag_store = 1;
00270 }
00271 if (internal_access_type == CMS_WRITE_ACCESS ||
00272 internal_access_type == CMS_WRITE_IF_READ_ACCESS ||
00273 status == CMS_READ_OK)
00274 {
00275 dpi->number_of_new_messages++;
00276 if (dpi->number_of_new_messages < 1)
00277 {
00278 dpi->number_of_accesses = 1;
00279 dpi->number_of_new_messages = 1;
00280 _handle->total_bytes_moved = 0;
00281 pre_op_total_bytes_moved = 0;
00282 first_diag_store = 1;
00283 }
00284 }
00285 else if (disable_diag_store)
00286 {
00287 _handle->offset = orig_offset;
00288 first_diag_store = 0;
00289 _handle->enable_byte_counting = 1;
00290 return;
00291 }
00292
00293 dpi->bytes_moved += (_handle->total_bytes_moved - pre_op_total_bytes_moved);
00294 cmsdiag_curtime = etime () - cmsdiag_timebias;
00295 if (!first_diag_store)
00296 {
00297 double diff = cmsdiag_curtime - dpi->last_access_time;
00298 if (diff < 0.0)
00299 {
00300 dpi->bytes_moved = _handle->total_bytes_moved = 0.0;
00301 dpi->first_access_time = cmsdiag_curtime;
00302 dpi->last_access_time = cmsdiag_curtime;
00303 dpi->min_difference = 1e4;
00304 dpi->max_difference = 0.0;
00305 dpi->number_of_accesses = 0;
00306 dpi->number_of_new_messages = 0;
00307 _handle->total_bytes_moved = 0;
00308 pre_op_total_bytes_moved = 0;
00309 first_diag_store = 1;
00310 }
00311 if (!disable_diag_store)
00312 {
00313 if (diff < dpi->min_difference)
00314 {
00315 dpi->min_difference = diff;
00316 }
00317 }
00318 if (diff > dpi->max_difference)
00319 {
00320 dpi->max_difference = diff;
00321 }
00322 if (!disable_diag_store)
00323 {
00324 dpi->last_access_time = cmsdiag_curtime;
00325 }
00326 }
00327 else
00328 {
00329 dpi->bytes_moved = _handle->total_bytes_moved =
00330 (_handle->total_bytes_moved - pre_op_total_bytes_moved);
00331 dpi->first_access_time = cmsdiag_curtime;
00332 dpi->last_access_time = cmsdiag_curtime;
00333 dpi->min_difference = 1e4;
00334 dpi->max_difference = 0.0;
00335 dpi->number_of_accesses = 1;
00336 dpi->number_of_new_messages = 1;
00337 _handle->total_bytes_moved = 0.0;
00338 pre_op_total_bytes_moved = 0.0;
00339 }
00340 _handle->write (dpi, sizeof (CMS_DIAG_PROC_INFO));
00341 _handle->offset = orig_offset;
00342 first_diag_store = 0;
00343 _handle->enable_byte_counting = 1;
00344 }
|
|
||||||||||||
|
Definition at line 348 of file cmsdiag.cc. Referenced by internal_access().
00349 {
00350 if (NULL == _handle || !enable_diagnostics)
00351 {
00352 return;
00353 }
00354 long orig_offset = _handle->offset;
00355 _handle->enable_byte_counting = 0;
00356 if (NULL == di)
00357 {
00358 di = new CMS_DIAGNOSTICS_INFO ();
00359 di->dpis = new RCS_LINKED_LIST ();
00360 }
00361 else
00362 {
00363 di->dpis->delete_members ();
00364 }
00365 _handle->read (di, sizeof (CMS_DIAG_HEADER));
00366 _handle->offset += sizeof (CMS_DIAG_HEADER);
00367
00368 for (int i = 0; i < total_connections; i++)
00369 {
00370 CMS_DIAG_PROC_INFO cms_dpi;
00371 _handle->read (&cms_dpi, sizeof (CMS_DIAG_PROC_INFO));
00372 _handle->offset += sizeof (CMS_DIAG_PROC_INFO);
00373 if (cms_dpi.name[0] != 0 || cms_dpi.number_of_accesses != 0)
00374 {
00375 di->dpis->store_at_tail (&cms_dpi, sizeof (CMS_DIAG_PROC_INFO), 1);
00376 if (i == di->last_writer)
00377 {
00378 di->last_writer_dpi =
00379 (CMS_DIAG_PROC_INFO *) di->dpis->get_tail ();
00380 }
00381 if (i == di->last_reader)
00382 {
00383 di->last_reader_dpi =
00384 (CMS_DIAG_PROC_INFO *) di->dpis->get_tail ();
00385 }
00386 }
00387 }
00388 _handle->offset = orig_offset;
00389 _handle->enable_byte_counting = 1;
00390
00391 }
|
|
|
Reimplemented in TCPMEM. Definition at line 394 of file cmsdiag.cc. 00395 {
00396 if (!enable_diagnostics)
00397 {
00398 return (NULL);
00399 }
00400
00401 internal_access_type = CMS_GET_DIAG_INFO_ACCESS;
00402 status = CMS_STATUS_NOT_SET;
00403 blocking_timeout = 0;
00404 main_access (data);
00405 return (di);
00406 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 318 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read().
|
|
|
|
|
|
|
|
|
Definition at line 321 of file cms.hh. Referenced by perf_types_format().
|
|
|
Definition at line 322 of file cms.hh. Referenced by NML::msg2str(), and NML::str2msg().
|
|
|
|
|
|
Definition at line 325 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read().
|
|
|
|
|
|
|
|
|
Definition at line 330 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read(), cms_create(), and NMLmsg::update().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 339 of file cms.hh. Referenced by NML::get_address().
|
|
|
|
|
|
Definition at line 343 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::set_broadcast_address().
|
|
|
|
|
|
Definition at line 345 of file cms.hh. Referenced by CMS_SERVER_REMOTE_TTY_PORT::accept_local_port_cms(), and cms_copy().
|
|
|
Definition at line 346 of file cms.hh. Referenced by CMS_SERVER_REMOTE_TTY_PORT::accept_local_port_cms(), and cms_copy().
|
|
|
Definition at line 347 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::set_broadcast_address().
|
|
|
Definition at line 348 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 361 of file cms.hh. Referenced by CMS_SERVER_REMOTE_RPC_PORT::accept_local_port_cms().
|
|
|
|
|
|
|
|
|
Definition at line 364 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms().
|
|
|
Definition at line 365 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 377 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms(), CMS_SERVER_REMOTE_TTY_PORT::accept_local_port_cms(), and CMS_SERVER_REMOTE_RPC_PORT::accept_local_port_cms().
|
|
|
|
|
|
Definition at line 380 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 398 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 430 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms(), CMS_SERVER_REMOTE_PORT::accept_local_port_cms(), and CMS_SERVER_REMOTE_TCP_PORT::unregister_port().
|
|
|
Definition at line 431 of file cms.hh. Referenced by CMS_SERVER_REMOTE_UDP_PORT::accept_local_port_cms(), and CMS_SERVER_REMOTE_TCP_PORT::unregister_port().
|
|
|
|
|
|
Definition at line 435 of file cms.hh. Referenced by CMS_SERVER_REMOTE_PORT::accept_local_port_cms().
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 440 of file cms.hh. Referenced by CMS_UPDATER::CMS_UPDATER().
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 451 of file cms.hh. Referenced by NML_SERVER_LOCAL_PORT::blocking_read().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reimplemented in SHMEM. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.11.1 written by Dimitri van Heesch,
© 1997-2001