hal_signal_new.3hal

来自「CNC 的开放码,EMC2 V2.2.8版」· 3HAL 代码 · 共 53 行

3HAL
53
字号
.TH hal_signal_new "3hal" "2006-10-12" "EMC Documentation" "HAL".SH NAMEhal_signal_new, hal_signal_delete, hal_link, hal_unlink \- Manipulate HAL signals.SH SYNTAX.HPint hal_signal_new(char *\fIsignal_name\fR, hal_type_t \fItype\fR).HPint hal_signal_delete(char *\fIsignal_name\fR).HPint hal_link(char *\fIpin_name\fR, char *\fIsignal_name\fR).HPint hal_unlink(char *\fIpin_name\fR).SH  ARGUMENTS.IP \fIsignal_name\fRThe name of the signal.IP \fIpin_name\fRThe name of the pin.IP \fItype\fRThe type of the signal, as specified in \fBhal_type_t(3hal)\fR..SH DESCRIPTION\fBhal_signal_new\fR creates a new signal object.  Once a signal has beencreated, pins can be linked to it with \fBhal_link\fR.  The signal objectcontains the actual storage for the signal data.  Pin objects linked to thesignal have pointers that point to the data.  'name' is the name of the newsignal.  If longer than HAL_NAME_LEN it will be truncated.  If there is alreadya signal with the same name the call will fail.\fBhal_link\fR links a pin to a signal.  If the pin is already linked to thedesired signal, the command succeeds.  If the pin is already linked to someother signal, it is an error.  In either case, the existing connection is notmodified.  (Use 'hal_unlink' to break an existing connection.)  If the signalalready has other pins linked to it, they are unaffected - one signal can belinked to many pins, but a pin can be linked to only one signal.\fBhal_unlink\fR unlinks any signal from the specified pin.\fBhal_signal_delete\fR deletes a signal object.  Any pins linked to the objectare unlinked..SH RETURN VALUEReturns a HAL status code..SH SEE ALSO\fBhal_type_t(3hal)\fR

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?