Завершено

develop a c/c++ windows console application to detect db9 serial pin changes and set pin high/low status - technology explained and source code example provided

os: windows 10 / 64 bits

application name: [login to view URL]

argument: com<port number> (case unsensitive)

Application core (example in attached [login to view URL] & .h c++ source):

The application is a loop based on windows media timer polling the serial port every milliseconds (code example attached, use of timeSetEvent api -> deprecated, to be replaced).

The serial ports are opened and closed with CreateFile and CloseHandle apis.

The port pin status are read with GetCommModemStatus api and set with EscapeCommFunction api. All algorithms and api parameter are used in attached source code.

system time in ms: GetTickCount() api

The application communicates thru standard input/output as follow (still case unsensitive):

- quit, bye, exit: ends loop and close console. Return sttus: 0 (exit(0))

- S(et),<pin number>,<value: 0 means low state, not 0 means high state, range 0x00 to 0xFF>: change pin state

Ex: s,1,1: set serial port pin 1 to high state

- G(et),<pin number>: returns pin state on standard output

Ex: g,8: returns pin 8 status with following syntax

- P(in),<pin number>,<system date/time in ms>,value: 0 or 1>

Ex: p,8,85412001212,0

- when a pin status changes: C(hange),<pin number>,<system date/time in ms>,<value>

Ex: c,7,5248554170,0: pin 7 state changed to 0

In case of error: print on standard output: error,<reason>, then exit(1) console.

- r : reset idle statusIdleStatus is an int used as mask to detect pin changes (see ResetIdle() in attached source code)

Usage example:

serialpiner com5: starts application and starts com5 management.

in case of error: print error:<error reason>

exit(1)

if no error:

s,2,1: set output pin 2 to high

g,2,1: get output pin 2 status

p,2,2565448,1: returns pin status 2 with date/time

c,3,2566954,0: input pin 3 status change detected to low

quit: ends session, exit(0)

Environment:

visual c/c++

Serial port pinout:

[login to view URL]

How to test:

usb/serial adapter + strap between pin 5 and input pin

voltmeter for output pins (1,2,6,8,9)

Квалификация: Программирование на С, Программирование на C++, Техника

Показать больше visual studio 2017 c++ serial port example, windows serial communication program, win32 serial port c++, serial port programming in c windows, sourceforge visual c++ serial, rs232 serial communication programming in c, c++ serial port library, windows 7 serial port c++, code source projet poker java download, code source photoshop layouts, microchip c18 example code, code source sms gateway php sql, set reddit code, develop bluetooth marketing software source code, j2me dictionary example free source code, example java source code j2me gps example, develop project barcode reader source code, develop video games j2me source code, projects source code dot net technology, set wallpaper android source code

О работодателе:
( 12 отзыв(-а, -ов) ) Groisy, France

ID проекта: #18397144

Поручен:

AlexFaster

Hi. I'm professional programmer/electronic hardware developer with experience over 20 years and I know very well RS232 protocol and it's physical layer. I can write this program. Regards, Alex.

$250 USD за 3 дней(-я)
(42 отзывов(-а))
5.9

12 фрилансеров(-а) в среднем готовы выполнить эту работу за $181

hbxfnzwpf

I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 7 years. My work is online game developing, and mainly focus on server side, using c++ under Linux environ Больше

$150 USD за 3 дней(-я)
(145 отзывов(-а))
7.0
dinhfreedom

Dear sir. Your project attracted my attention at first glance, because I've extensive experience in C++ & Engineering Programming. I'm really confident about your project, and very eager to join your project. If we Больше

$200 USD за 3 дней(-я)
(57 отзывов(-а))
6.3
C3guru

Nice to meet you. I have read your job description. Your project is extremely easy for me, but not for others. I'm 100% sure I can satisfy you. Well, talking about my ability, I learned how to program in C/C++ and Больше

$300 USD за 2 дней(-я)
(14 отзывов(-а))
4.8
ironstar20311

Hi Good hands on serial communication, UART, parsing it with state machine. I have rich experience on embedded system program including the NXP [login to view URL] series. I faced the same problem with you. Even I have the Больше

$150 USD за 1 день
(23 отзывов(-а))
4.3
CVipulS

Hey there, the given example will be expanded for making a working console app matching the given description. Will you please specify further requirement? I do development with C++, for engineering native solutio Больше

$129 USD за 3 дней(-я)
(8 отзывов(-а))
4.2
alexandersapov

Hello, I can do it. I have a good experience with working serial ports. So your job is very likely to me.

$133 USD за 7 дней(-я)
(2 отзывов(-а))
3.8
arielfenix

am Senior Embedded Systems & C/C++ developer. Developer expert on VC++, Eclipse Mars for C/C++, gcc,g++ in Win and Linux. OpenGL, OpenCV, Cuda. Developer expert on low level programing on C/C++. Expert on PIC, ATM Больше

$200 USD за 10 дней(-я)
(5 отзывов(-а))
3.5
mdeyog

Hi, I did this kind of apps in past. Can help you on your task. I'm experienced C++ developer and have worked with RS232 on Windows in past. Thanks.

$140 USD за 4 дней(-я)
(2 отзывов(-а))
3.5
ycb811

Greeting. I am YinWang. I have rich embedded development experiences. I am very interesting in your project. I really hope to work with you. This project is very appreciated in my skill. regards.

$200 USD за 3 дней(-я)
(1 отзыв)
2.5
Turtle125

I have read and understood your needs for the project but i do have questions: 1) will this need to be TTL or mix voltage technology 2) will the console program just close automatically or will stay on with an pre Больше

$155 USD за 4 дней(-я)
(0 отзывов(-а))
0.0
chuong5

I have implementation for command line interpreter (with parsing and validation rule for your need ) already, to do this project just a matter of porting to your application specification. I can also provide you *.i Больше

$166 USD за 2 дней(-я)
(0 отзывов(-а))
0.0