Python에서 bytes, bytearray 를 다룰 때 참고
Format string - Byte order, size, alignment
첫 번째 문자가 이들 중 하나가 아니면 '@'으로 가정
Format character
Example
Windows PC에서 endian을 지정하지 않고 했을 경우 => 네이티브로 판단하여 intel계열의 little-endian 으로 출력
Little-endian vs Big-endian
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.
Python에서 bytes, bytearray 를 다룰 때 참고
Windows PC에서 endian을 지정하지 않고 했을 경우 => 네이티브로 판단하여 intel계열의 little-endian 으로 출력
Little-endian vs Big-endian
Visual Studio Code에 Espressif IoT Development Framework을 개발, 빌드, 롬라이팅, 모니터링, 디버그 등을 지원
Extention을 설치하기 전에 사용하고자 하는 환경에 따라 아래의 프로그램들을 설치해야 한다.
Linux | MacOS | Windows |
---|---|---|
Python 3.5+ | Python 3.5+ | Python 3.5+ |
PIP | PIP | PIP |
Git | Git | Git |
CMake | CMake | C++ Build Tool |
Ninja-build | Ninja-build | Rust |
위의 링크에서 다운받은 설치파일을 실행 시키고 첫번째 항목("C++ build tools")을 선택하고 Install 버튼을 누른다.
설치가 완료되고 나서 설치가 잘되었는지 아래와 같이 확인한다.윈도우 시작메뉴 에서 Development Command Prompt for VS를 실행시킨다.
Image처리를 하다보면 memory buffer에 있는 image raw데이터를 BMP포멧으로 저장할 필요가 있다.
OpenCV를 ARM용으로 Cross Compile후 strip실행시 아래와 같은 오류 발생
$ strip -s *.sostrip: Unable to recognise the format of the input file 'libopencv_calib3d.so'
원인은 strip을 호스트용을 사용해서 발생한 것으로 ARM용으로 strip을 할수 있는 arm-linux-gnueabi-strip을 사용하면 정상적으로 strip이 되는것을 확인할 수 있다.
$ arm-linux-gnueabi-strip -s *.so
Windows 10 OS에서 Visual Studio Code 환경에서 C++ 컴파일 환경을 구축해보자
우선 Visual Studio Code를 여기(code.visualstudio.com)서 다운로드 받아 설치합니다.
VSC를 다운받아 설치하고 실행하면 환영창이 나오고, 좌측에 파일탐색, 찾기, Git, 실행/디버그, 확장(extension) 탭 5개가 있는것을 확인할 수 있다.
제일 아래쪽에 위치한 녹색으로 표시한 확장 탭을 누르고, 노란색으로 표기한 검색창에 "C++"을 입력하면 위의 사진과 같이 검색 결과 표시된다.
프로토콜 버퍼란?
구글에서 만들어서 공개한 구조화된 데이터를 직렬화 하기 위한 언어중립적이고, 플랫폼 중립적인 확장 메카니즘이며, 저장을 목적으로 서로 통신할 프로그램을 개발할 때 유용하다.
지원 언어 : C++, Python, JAVA, GO
#include < wininet.h >
HINTERNET hOpen, hConnect, hReq;
LPCSTR postheader = "Content-Type: application/x-www-form-urlencoded";
int port = 80;
hOpen = InternetOpen("SimplePost", INTERNET_OPEN_TYPE_PRECONFIG, 0, 0, 0);
if(hOpen == NULL) {
return -1;
}
// "127.0.0.1"대신에 다운받을 화일이 있는 서버주소를 입력
hConnect = InternetConnect(hOpen, "127.0.0.1", port, 0, 0, INTERNET_SERVICE_HTTP, 0, 0);
hReq = HttpOpenRequest(hConnect, "POST", "/test.bin", "HTTP/1.1", 0, 0, INTERNET_FLAG_NO_CACHE_WRITE, 0);
HttpSendRequest(hReq, postheader, lstrlen(postheader), NULL, 0);
DWORD dwRead = 0;
DWORD Size;
CHAR Data[1025] = "";
FileOpen("Filename");
do
{ // 다운받는화일의 나머지 크기 얻어오기
InternetQueryDataAvailable(hReq,&Size,0,0); // 남은 크기가 1024보다 크면 1024로 고정
if(Size>1024) Size = 1024;
InternetReadFile(hReq, (LPVOID)Data, Size, &dwRead);
if(dwRead) {
Data[dwRead] = 0x00;
FileWrite(Data, Size);
}
} while(dwRead != 0); //읽어온 데이터의 크기가 0이 아니면 계속 반복
FileClose();
InternetCloseHandle(hConnect);
InternetCloseHandle(hOpen);
hConnect = NULL;
hOpen = NULL;
// FileOpen(), FIleWrite(), FIleClose()함수 별도
프로젝트 생성 프로젝트를 생성하고자 하는 폴더에서 npx @react-native-community/cli init [ 프로젝트명 ] npx @react-native-community/cli init firstapp 해당 폴더에 [프로젝트명...