Readme: Added sending functions
This commit is contained in:
		
							parent
							
								
									6fa9150816
								
							
						
					
					
						commit
						6c4a3211dc
					
				
							
								
								
									
										42
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										42
									
								
								README.md
									
									
									
									
									
								
							| @ -133,5 +133,47 @@ msghandlerString(oscType, data, msgID, hwnd) | ||||
| } | ||||
| ``` | ||||
| 
 | ||||
| ### OSC send functions | ||||
| The DLL also can be used to transmit OSC messages from AutoHotkey by using the following functions: | ||||
| 
 | ||||
| #### Send integer message | ||||
| ```cpp | ||||
| void sendOscMessageInt(char* ip, unsigned int port, char* address, int payload); | ||||
| ``` | ||||
| Example call from AHK: | ||||
| ``` | ||||
| ip := "192.168.1.2" | ||||
| port := 8002 | ||||
| addr := "/testmsg" | ||||
| data := 42 | ||||
| DllCall("OSC2AHK.dll\sendOscMessageInt", AStr, ip, UInt, port, AStr, addr, Int, data) | ||||
| ``` | ||||
| 
 | ||||
| #### Send float message | ||||
| ```cpp | ||||
| void sendOscMessageFloat(char* ip, unsigned int port, char* address, float payload); | ||||
| ``` | ||||
| Example call from AHK: | ||||
| ``` | ||||
| ip := "192.168.1.2" | ||||
| port := 8002 | ||||
| addr := "/my/msg" | ||||
| data := 42.3 | ||||
| DllCall("OSC2AHK.dll\sendOscMessageFloat", AStr, ip, UInt, port, AStr, addr, Float, data) | ||||
| ``` | ||||
| 
 | ||||
| #### Send string message | ||||
| ```cpp | ||||
| void sendOscMessageString(char* ip, unsigned int port, char* address, char* payload); | ||||
| ``` | ||||
| Example call from AHK: | ||||
| ``` | ||||
| ip := "192.168.1.2" | ||||
| port := 8002 | ||||
| addr := "/some/message" | ||||
| data := "This is the string" | ||||
| DllCall("OSC2AHK.dll\sendOscMessageString", AStr, ip, UInt, port, AStr, addr, AStr, data) | ||||
| ``` | ||||
| 
 | ||||
| ## Credits | ||||
| This DLL uses the [oscpack](http://www.rossbencina.com/code/oscpack) OSC implementation by Ross Bencina. | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user