Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. complete

complete

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++databasecomannouncement
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kiethnt
    wrote on last edited by
    #1

    Dear all, Now I'm writing a small program to communicate via RS232 with 3964 protocol, however Idon't understand why I cannot compile this source code. Any body please help me solve this problem. // 3964PROTOCOL.cpp : Defines the entry point for the console application. // #include #include #include #include #include #include #include #include "perce.h" #define ESC 27 void interrupt(*oldvect_ser)(); extern void interrupt int_sio(); extern void restore_8250 (void); extern void init_8250 (void); extern void send_tele (char *, short); extern WORD state, receive_counter, protocol_error; extern BYTE receive_buffer[]; BYTE choice,sio_eoi; BOOL receive, autosend; WORD Com_basis,len; BYTE send_buffer[BUFFER_MAX]; BYTE tmp_buffer[BUFFER_MAX]; BYTE *mode,*port; /*=========================================================*/ void warte (void) { long i; /* warte ein wenig */ for (i=0;i<500000;i++) i = i; } /*----------------------------------------------------------------------- * MENUE *-----------------------------------------------------------------------*/ void menue (void) { clrscr(); printf ("\n\n"); printf ("Final Version of KUKAVISION.EXE \n"); printf ("Serial device with 3964R protocol mod. P.S. 08.08.03\n\n"); printf ("[1] send teststring [4] COM 1 \n"); printf ("[2] getNum [5] COM 2 \n"); printf ("[3] getDat [6] reset protocol\n"); printf (" [ESC] quit\n"); printf ("Aktueller Port: %s\n",port); printf ("Mode : %s\n", mode); printf ("Number of elements: %d\n",numEl); printf ("Element index: %d\n",elementIndex); printf ("Element Data: %s\n---------\n", &send_buffer[0]); } /****************************** SEND_TELEGRAM *******************************/ void send_telegram (BYTE *buffer) { if ((len = strlen (buffer)) > 0) { send_tele (buffer, len); warte (); warte (); warte (); if (state == E1) { state = RUHE; protocol_error=2; } else protocol_error=6; } /********************* MONITORING **********************/ void monitoring (void) { short i; printf("-> : "); for (i=0;i

    C 1 Reply Last reply
    0
    • K Kiethnt

      Dear all, Now I'm writing a small program to communicate via RS232 with 3964 protocol, however Idon't understand why I cannot compile this source code. Any body please help me solve this problem. // 3964PROTOCOL.cpp : Defines the entry point for the console application. // #include #include #include #include #include #include #include #include "perce.h" #define ESC 27 void interrupt(*oldvect_ser)(); extern void interrupt int_sio(); extern void restore_8250 (void); extern void init_8250 (void); extern void send_tele (char *, short); extern WORD state, receive_counter, protocol_error; extern BYTE receive_buffer[]; BYTE choice,sio_eoi; BOOL receive, autosend; WORD Com_basis,len; BYTE send_buffer[BUFFER_MAX]; BYTE tmp_buffer[BUFFER_MAX]; BYTE *mode,*port; /*=========================================================*/ void warte (void) { long i; /* warte ein wenig */ for (i=0;i<500000;i++) i = i; } /*----------------------------------------------------------------------- * MENUE *-----------------------------------------------------------------------*/ void menue (void) { clrscr(); printf ("\n\n"); printf ("Final Version of KUKAVISION.EXE \n"); printf ("Serial device with 3964R protocol mod. P.S. 08.08.03\n\n"); printf ("[1] send teststring [4] COM 1 \n"); printf ("[2] getNum [5] COM 2 \n"); printf ("[3] getDat [6] reset protocol\n"); printf (" [ESC] quit\n"); printf ("Aktueller Port: %s\n",port); printf ("Mode : %s\n", mode); printf ("Number of elements: %d\n",numEl); printf ("Element index: %d\n",elementIndex); printf ("Element Data: %s\n---------\n", &send_buffer[0]); } /****************************** SEND_TELEGRAM *******************************/ void send_telegram (BYTE *buffer) { if ((len = strlen (buffer)) > 0) { send_tele (buffer, len); warte (); warte (); warte (); if (state == E1) { state = RUHE; protocol_error=2; } else protocol_error=6; } /********************* MONITORING **********************/ void monitoring (void) { short i; printf("-> : "); for (i=0;i

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      It would be nice that you tell us at least what the exact error message is and to paste only relevant code. I'm sure if you did that, you would already have an answer (I seriously doubt that anybody wants to go to your complete source and hunt for your problem). Man, the error messages supplied by your compiler ARE usefull.


      Cédric Moonen Software developer
      Charting control [v1.1]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups