go wrapper for snap7.
base on snap7-full-1.4.2.
snap7.h中定义了很多的常量没有使用,这样两个文件引入的话就会出现重复定义的变量名。
这个看起来是个顶级错误,but why?
if ((Job.WordLen==S7WLBit) && (Job.Amount>1))
return errCliInvalidTransportSize;
s7_micro_client.cpp的方法opReadArea
func GlobalReadEventsCallback(usrPtr *C.void, event C.PSrvEvent, size C.int) {
}
event是一个指针,如果直接转化为一个go语言指针,这样看起来很危险,
go语言的运行时是否会认为这样的指针也尝试去释放呢?
实际上这个指针是c语言分配的。
所以我认为正确的做法是,在go语言里重新构造,只是使用他的数据
panic: runtime error: cgo argument has Go pointer to Go pointer
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.