NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC GUI's secure access shared memory emc2

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: secure access shared memory emc2

secure access shared memory emc2 06 Lug 2011 10:17 #11190

  • michel45
  • michel45's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
Hello,
We have developed an interface in qt4 inspired by mocca (​​thank Thomas "gtom").
To communicate with the outside (with cards Mesa), we use a memory shared with EMC2.

In summary this gives (in principle to write a bit):
// file GUI
struct Data { hal_bit_t *prelay;};
Data *pData;
pData pHData;

pHData = pData(hal_malloc(sizeof(Data))); /// return pointeur shared memory

..... //creation pin bit via hal_pin_bit_new(...)

void SetContact(bool state) { *pHData->prelay = state;} // write in shared memory
The program works, (check with "Configuring HAL").

How EMC2 manages access to shared memory area ? is what structures with "shminfo" and/or semaphore ?
We want to avoid that and the interface emc2 write all such :-(

Thank you for any information, links, etc.
Michel
The administrator has disabled public write access.

Re:secure access shared memory emc2 07 Lug 2011 06:33 #11227

  • michel45
  • michel45's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
hello,
I think the solution is to use the functions rtapi_mutex_give (), rtapi_mutex_try (), rtapi_mutex_get ().
I found this in the code source "src / rtapi/ rtapi.h".
I will try.
Thank you and goodbye
Michel
The administrator has disabled public write access.

Re:secure access shared memory emc2 07 Lug 2011 17:29 #11239

  • cmorley
  • cmorley's Avatar
  • OFFLINE
  • Moderator
  • Posts: 1486
  • Thank you received: 40
  • Karma: 89
You have a screen shot?
The administrator has disabled public write access.

Re:secure access shared memory emc2 08 Lug 2011 02:56 #11251

  • michel45
  • michel45's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 20
  • Karma: 0
screenshot of the interface?
Currently, only one interface development. The client interface will be operational in September / October, a very different arrangement.
The destination machine is visible on the site www.mipretec.ch.
The touch screen is 1920x1080 vertically.
Michel
Last Edit: 08 Lug 2011 03:00 by michel45. Reason: add image
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.900 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.